can anyone see the awk syntax error near line 1? I keep getting this error and I'm not familiar with awk very well yet so it is hard for me to see the errors.
fyi: deleteuser* refers to files in the directory where each one ends with a different date
ls -1 /mfupload/prod02/ftp/deleteuser* | while read line
do
cat $line | awk -F '|' {printf "%s|%\n", $5, $3} >> ftp.dat
done
i actually tested your code on one of my files and it does work as i wrote it ... try the cat-awk line on one of your input files from the command line --- if it works there, it should work in the loop too ... if not, maybe your cat-awk line doesn't really correspond to your input file ...
reborg might be right ... i tested with no spaces after the "-F" as that is how i use the command by default but wrote down the code line as you did it ...