[olug] Nesting commands at command line
Nick Walter
waltern at iivip.com
Mon Aug 4 15:03:46 UTC 2003
There is a find specific method of doing this, but the nice general way
to iteratively deal with multiline output from a command is to use a
little shell script along the lines of
for X in `find /var/www -name bad_file`
do
echo "Removing $X"
rm -f $X
done
Nick Walter
On Mon, 2003-08-04 at 09:53, Craig Wolf wrote:
> I am not finding the answer at google probably because I am not searching on the right terms. I need to pipe a multiline output as the input to another command and I can't remember/find the answer to do it.
> I need to find a file in all locations: find /var/www -name bad_file
> I then need to remove those files.
>
> Any and all help appreciated!
>
>
> Craig Wolf
> Linux Web Server Support
> Backup Supervisor
> Desktop/Network Specialist
> 402-894-6283
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
>
More information about the OLUG
mailing list