[plug] function error
Stuart Midgley
stuart.midgley at ivec.org
Wed Jan 11 23:04:23 WST 2006
sorry, my fortran is showing through... those are "for" loops
for line in $( cat $FILE); do
command on line
done
Stu.
On 11/01/2006, at 22:59, Stuart Midgley wrote:
> perhaps use awk or sed?
>
> Or, you can set the IFS to just <new-line> and do a standard for loop
>
> IFS=$'\x0a'
> do line in $( cat $FILE ); do
> command on line
> done
>
> or if you don't like octal do
>
> IFS="<ctrl-v><ctrl-j>"
> do line in $( cat $FILE ); do
> command on line
> done
>
> where <ctrl-v> and <ctrl-j> are holding down the control key and
> pressing the v and j respectively. This will look like
>
> IFS="
> "
>
> Stu.
--
Dr Stuart Midgley
Industry Uptake Program Leader
iVEC, 'The hub of advanced computing in Western Australia'
26 Dick Perry Avenue, Technology Park
Kensington WA 6151
Australia
Phone: +61 8 6436 8545
Fax: +61 8 6436 8555
Email: industry at ivec.org
WWW: http://www.ivec.org
More information about the plug
mailing list