6

append text to column in all files of directory

view full story
linux-howto

http://www.unix.com – Hi, I want to append "chr" to all col 2 values of all files in a particular folder. This is what I came up with but isnt working. Please help. Code: ls -1 * | ( while read line do awk 'BEGIN {FS=OFS=":"} {$2="chr"$2;print $0}' $line > $line_new done ) Another question is, how to delete records from a file which have the same value in columns 3 through 39. Thanks Much (HowTos)