[lug] bash scripting question
Zan Lynx
zlynx at acm.org
Fri Nov 18 09:46:22 MST 2005
On Fri, 2005-11-18 at 08:45 -0700, Hugh Brown wrote:
> I've had this problem a few times and haven't found a quick way to get
> around it. I often do per file operations at the bash prompt with
> something like this:
>
> for i in `ls`; do
> command $i| othercommand
> done
for i in *; do command "$i" | othercommand; done
or
find -maxdepth 1 -print0 | xargs -0 -i sh -c 'command {} | othercommand'
--
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20051118/a5199660/attachment.pgp>
More information about the LUG
mailing list