[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Taking input line by line from a config file in Bash
From: |
Matthew_S |
Subject: |
Re: Taking input line by line from a config file in Bash |
Date: |
Wed, 2 Jan 2008 02:02:26 -0800 (PST) |
Hi Bob,
Thanks for the quick reply.
With the 'while read line', it appears that I don't need to keep track of
the line numbers. In fact this below does exactly what I need it to do;
cat $File | # Supply input from a file
while read line # As you suggested...
do echo $line
echo >> $RESULTS
echo $line >> $RESULTS
$line
[ $? == 0 ] && echo "PASSED" >> $RESULTS || echo "FAILED" >>
$RESULTS
done
exit
Thanks again.
Matthew.
--
View this message in context:
http://www.nabble.com/Taking-input-line-by-line-from-a-config-file-in-Bash-tp14575394p14575880.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.