#!/usr/bin/awk -f /\r/{ gsub("\r","") print > "removeCarriageReturn.tab" OK=1 } END{ if(OK){ printf "INFO: The table, '%s', has been converted from MS-DOS file format to Unix file format!!\n", ARGV[1] com=sprintf("mv removeCarriageReturn.tab %s", ARGV[1]) print | com close("com") } }