Working csh script:
#!/bin/csh
foreach xmlfile ( "`cat ~/reportlist.txt`" )
printf $xmlfile"|"
head -c 1000 $xmlfile | awk -F'[="]' '{print $15,"|",$21}'
end
This reads a text file line-by-line and navigates to each file and prints required variables from each file using awk.
I need to perform the same in a bash script. I am new to bash. How can I do this in bash?