Hi,
Hi guys
I've got both a sed and an awk that I need to run on hundreds of files, each sone works perfectly on a single file, but I need help getting each of them to run in batch mode, here they are:
sed -n 'g;n;p' inputfile.txt | sed '/\,/s/\,//g' > inputfile.out
awk 'NR==FNR{a[$1]=$0;next$3 in a{print $0 a[$1] " " a[$3]}' y.txt x.txt > out.out
actually what would be even better (if there's a way to do it) is to successively batch process:
sed -n 'g;n;p' inputfile1.out | sed '/\,/s/\,//g' > outputfile1.out
sed -n 'g;n;p' inputfile2.out | sed '/\,/s/\,//g' > outputfile2.out
awk 'NR==FNR{a[$1]=$0;next$3 in a{print $0 a[$1] " " a[$3]}' outputfile1.out outputfile2.out > finaloutputfile.txt
can someone help?
Tabitha
Hi guys
I've got both a sed and an awk that I need to run on hundreds of files, each sone works perfectly on a single file, but I need help getting each of them to run in batch mode, here they are:
sed -n 'g;n;p' inputfile.txt | sed '/\,/s/\,//g' > inputfile.out
awk 'NR==FNR{a[$1]=$0;next$3 in a{print $0 a[$1] " " a[$3]}' y.txt x.txt > out.out
actually what would be even better (if there's a way to do it) is to successively batch process:
sed -n 'g;n;p' inputfile1.out | sed '/\,/s/\,//g' > outputfile1.out
sed -n 'g;n;p' inputfile2.out | sed '/\,/s/\,//g' > outputfile2.out
awk 'NR==FNR{a[$1]=$0;next$3 in a{print $0 a[$1] " " a[$3]}' outputfile1.out outputfile2.out > finaloutputfile.txt
can someone help?
Tabitha