Reading of variable in a single line command

view full story

http://www.unix.com – Hi All, Below is a sample command that I can run without any problem in the command line. Command Line HTML Code: dtToday=`date +%Y%m%d`; ls -ltr ./filename_${dtToday}.txt -rw-r--r--  1 monuser oinstall 0 Jan 18 11:02 ./filename_20130118.txt But once I put that command line in file (list.txt) and read from it, an error occurs. Pls. see below the code: HTML Code: cat ./list.txt|while read xLine do echo "`echo $xLine | awk -F \"|\" '{print $2}'`" echo "=========" `echo $xLine | awk -F "|" '{print $2}'` done ========== & (HowTos)