awk 'NR==1,NR==20{gsub(/aaa/,"AAA");gsub(/ddd/),"DDD"}1' file.txt
sed -n '1,20{s#aaa#AAA#g;s#ddd#DDD#g}' file.txt
sed '1,20p' file.txt |tr "ad" "AD"
sed "1,20y/ad/AD/" file.txt
sed "1,20s#[ad]#\U &#g" file.txt
awk 'NR==1,NR==20{print toupper($0)}' file.txt
帖子还没人回复快来抢沙发