ozum
1
Hi,
I 'm trying to send an e-mail for every different line in the .txt
for i in {1..$variable}
do
sed -n "/$i$/p" text.txt
done
I have two problems about this.
First one is that for loop doesn't work
and the second one is that i cant get the output of sed
while read myLine
do
echo "this is my line->[${myLine}]"
done < text.txt
for i in `seq 1 $variable`
do
sed -n ''$i',$p' text.txt
echo "send mail....."
done
for i in `cat test.txt`
do
#print the line in the file test.txt
echo $i
#send mail
echo $i | mailx -s "test subject" test@mail.com
done
ozum
5
Thanks for the replies
for i in `cat text.txt` ...
worked..
seq didn't work in ksh