以下は私のコードです:
#!/bin/ksh -p
NAME=$1
echo $NAME likes to drink:
grep $NAME ~/practice/database/likes
echo total number of beers $NAME likes to drink:
grep $NAME ~/practice/database/likes | wc -l
以下は私の出力です:
dave likes to drink:
dave,coors
dave,bud
total number of beers dave likes to drink:
2
「coors」と「bud」を出力するにはどうすればよいですか?