shell script: read in values from text file
before i forget how to do this againassuming test.txt contains a number on each line
ie.
heres a couple of simple ways to read from the file and so stuff in a shell script
ie.
123
324
45656
heres a couple of simple ways to read from the file and so stuff in a shell script
#!/bin/bashINFILE=test.txt
OUTFILE=out.xmlfor i in $(cat $INFILE) ; do #do some stuff
echo item: $idone
or use
while read line
do
echo $line;
done < $INFILE
( echo "</oai_dc:dc>" >> $OUTFILE )