Search Results

Search: Posts Made By: prashob123
8,801
Posted By Scrutinizer
Try: awk ' { A[$1]++ B[$1]+=$2 ...
Try:
awk '
{
A[$1]++
B[$1]+=$2
C[$1]=C[$1] (C[$1]==""?x:"+") $2
}
END{
for(i in A) print i, A[i], B[i], C[i]
}
' OFS='\t' file
3,163
Posted By RudiC
Trywhile read col1 col2 col3 rest do ...
Trywhile read col1 col2 col3 rest
do
case $col3 in
(white) printf "%s\n%s\n" "*colors are random: yes" "*colors are light: yes";;
(brown) printf "%s\n%s\n" "*colors are dark: no"...
3,163
Posted By MadeInGermany
Yes >> is "append to file", but cat is not...
Yes >> is "append to file", but cat is not needed.
print "white" >> insert.txt
or, as Rudi suggested, redirect the output of the whole loop
while ...
do
...
done >> insert.txt
Showing results 1 to 3 of 3

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