Quote:
Originally Posted by urban.yoga.journeys
as i understand it, and i'm no expert so please bear with me, $line is the entire line correct?
which would mean that *PATTERN* would also have to be the entire line to match, if it were only a word or part of a word, there would be no match.
|
yes
Quote:
|
or does the while-read-line construct read word per word? AFAIK it reads entire lines, but like i said i'm no expert
|
to read per word, you can set it as you iterate the file
Code:
while read -r line
do
set -- $line
for item in $@
do
echo "-->$item"
done
done <"file"