Hi,
I have a ksh script where I have an awk statement to exclude a few items... but my "few items" has now grown substantially and I'm looking for a nice compact way of doing this. Maybe putting the exceptions into a file or something? Any suggestions greatly appreciated.
# Excluded items
JOB1=DW801P
JOB2=DW801P_SP
JOB3=DW803P
JOB4=DW803P_SP
# Results from another command are being piped to this awk statement.
awk '{if ($4 != "'"$DATE"'" && $2 != "'"$JOB1"'" && $2 != "'"$JOB2"'" && $2 != "'"$JOB3"'" && $2 != "'"$JOB4"'") print $1" "$2" "$4}' >> $FILE
Excluded items has grown to over 30...
Thanks!