RANK NAME BAND YEAR GENERE DOMESTIC/INTERNATIONAL
206:Reach Out, I'll Be There:The Four Tops:1978:Pop:3/2
207:Bye Bye Love:The Everly Brothers:1950:Classic:3/2
208:Gloria:Them:1965:Classic:1/1
209:In My Room:The Beach Boys:1985:Classic:5/7
210:96 Tears:? & the Mysterians:1964:Classic:20/15
211:Caroline, No:The Beach Boys:1975:Classic:5/7
212:1999:Prince:1958:Classic:5/7
213:Your Cheatin' Heart:Hank Williams:1988:Soul:7/6
214:Rockin' in the Free World:Neil Young:1960:Pop:5/7
215:Sh-Boom:The Chords:1967:Alternative:3/2
216:Do You Believe in Magic:The Lovin' Spoonful:1988:Classic
217:Jolene:Dolly Parton:1998:Classic:7/6
218:Boom Boom:John Lee Hooker:1966:Classic:7/6
1st I tried to print a list of Rank, performers and songs with header so I tried:
but the output still have the default header under the line
nawk 'BEGIN { FS=":"
printf "%-10s %-35s %-55s\n", "RANK", "PERFORMER","SONG"
print "=====================================================================\n"}
{printf "%-10s %-35s %-55s\n", $1, $3, $2}' songs
Мне не удалось посчитать количество песен для каждого типа жанра и сообщить итоги каждого жанра
Желаемый вывод - пример:
классический 10
R & B 5
Душа 9 и т.д.
Я старался
awk '{count+$5} END {print $5}'
песни, но не удалось вернуть результат