i have a script, whcih takes values from a file and assign it to one variable. this text value contains name of few object. value contains line by lie. i.e. one after another.
when i am assaign the value of this text file to a variable, it accept the value as one liner instead of one by one. pls help me in this.
#!/bin/bash
exclude="`cat /tmp/excludejobs`"
echo $exclude > /tmp/testexclude
find /home/bosuser/Production/jil/* | xargs grep /home/bosuser|cut -d "." -f1|cut -d "/" -f6|uniq > /tmp/includejob
job="`cat /tmp/includejob`"
echo $job > /tmp/testinclude
for i in $job
do
if [ $i !=
$exclude ]
then
anjil -sd $job > /tmp/document
cat /tmp/documnet | grep 'Team Mail Alias' > /tmp/rawmail
cat /tmp/rawmail | cut -d ":" -f2 > /tmp/mailalias
/usr/ucb/mail -s "notification"
xx@yyyyy.com
fi
here the value takes as one liner instead of one by one.
in csh sheel we have "foraech" command but in bash how can i fullfill this