Mailinglist Archive: opensuse (2772 mails)

< Previous Next >
Re: [opensuse] Another Bash scripting question
  • From: Rodney Baker <rodney.baker@xxxxxxxxxxxx>
  • Date: Sun, 18 May 2008 01:00:47 +0930
  • Message-id: <200805180100.58013.rodney.baker@xxxxxxxxxxxx>
On Sat, 17 May 2008 23:30:51 Randall R Schulz wrote:
[...]

So if your script was something like this:

-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
#!/bin/bash --norc

for arg; do

# Do stuff with "$arg" (always quote it!)

done
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-


Then just invoke it like this:

% for file in $(find * -print0 | xargs --null scriptName)


Randall,

Further to my previous reply, I've changed it as per your suggestion and setup
an alias for the above command line. It works a treat. I figure that it will
be fairly easy now to add a coupe of extra parameters to the script so that I
can specify the input and output formats rather than having them hardcoded;
however that will be a project for another day. Time for bed now.

Thanks again,
Rodney.


--
===================================================
Rodney Baker VK5ZTV
rodney.baker@xxxxxxxxxxxx
===================================================

Indifference will be the downfall of mankind, but who cares?
< Previous Next >