[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Expand "{file1,file2}"
From:       "Miguel A. Reynoso" <tallerlinux () gmail ! com>
Date:       2011-04-21 22:48:10
Message-ID: 4DB0B42A.5080905 () gmail ! com
[Download RAW message or body]

On 21/04/11 20:08, Harald Becker wrote:
>   Hi Miguel!
>
>>> On 21.04.2011 20:12, Miguel A. Reynoso wrote:
>>>> strip src/{vpm,vpmbulk}
>>>> Its possible use busybox ash applet with this expand commands ??.
>>> Brace expansions are a bash-ishm extension not available in ash.
>>>
>> Thank's so much Harald.
> You may consider to use the following construct:
>
> for f in vpm vpmbulk
>    do strip "src/$f"
> done
>
> This works in ash, bash and probably in any other POSIX compliant shell.
> May be combined with globing features like in:
>
> cd your_globing_base_directory
> for f in xyz-* abc* u*.txt ??x??.*
>    do put_your_commands_here_using "$f"
>    # needs quoting of $f in case of space or special characters in file name
>    # else not required
> done
>
> For more informations see ash (1) manual page (use Google etc. if you do
> not have that manual page on your local machine).
>
> --
> Harald
>

Thanks for your suggestions. I have read the mapage of ash and I'm 
making the necessary changes in my sh code to make it fully POSIX 
compilance and busybox compatible.

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic