var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Read each line of a file
If I have a file that looks like this:
In a unix script how I can grab one line at a time in that file and email it to someone?
Check the man pages for read, while and mailx
cat <filename> | while read fileline
echo $fileline | mailx ....
for i in `cat <filename>`
mail -s "Your monthly sales figures" $i
It's been awhile since I've used the mail utility and you may use something different so that line may need tweaking.
I use the 'for/cat' combination all the time and this is how I would do what I think it is that you're asking.
That will read one word at a time, not one line at a time
Originally Posted by dbrooker
for i in `cat file1`