suppress the output to screen in shell script
Hi i have written a small script: #!/usr/bin/ksh for i in *.DAT do awk 'BEGIN{OFS=FS=","}$3~/^353/{$3="353861958962"}{print}' $i >> $i_changed awk '$3~/^353/' $i_changed >> $i_353 rm -rf $i_changed done exit i tested it and its wrking fine. But it is giving the output to screen i dont need the output to screen. i simply need the final file that is made $i_353 how is it possible? Wrap the body of the script in braces and redirect to /dev/null: #!/usr/bin/ksh { for i in *.DAT do awk 'BEGIN{OFS=FS=","}$3~/^353/{$3="353861958962"}{print}' $i >> $i_changed awk '$3~/^353/' $i_changed >> $i_353 rm