Search Results

Search: Posts Made By: calitiggr
1,114
Posted By Scrutinizer
Hi, it could be shortened like this: for...
Hi, it could be shortened like this:

for file in *;
do
awk -F '\t' '{for (i=1;i<=NF;i++) a[i]+=$i} END {printf FILENAME; for (i=1;i<=NF;i++) printf FS a[i]/NR;print ""}' "$file" >>...
7,241
Posted By rdcwayx
awk 'NR==1{print FILENAME,FILENAME,FILENAME RS...
awk 'NR==1{print FILENAME,FILENAME,FILENAME RS $0} NR>1 ' $file > temp
mv temp $file
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy