题目内容

将输入中非单词边缘的42替换为[42]$ echo 'hi42bye nice421423 bad42 cool_42a 42c' | awk '____________________'hi[42]bye nice[42]1[42]3 bad42 cool_[42]a 42c

查看答案
更多问题

将输入中以s开头且以任意顺序包含e和t的单词用[]括起来$ echo 'sequoia subtle exhibit asset sets tests site' | awk '____________________'sequoia [subtle] exhibit asset [sets] tests [site]

将输入中以a或r结尾的单词后面的空格替换为换行符$ echo 'area not a _a2_ roar took 22' | awk '____________________'areanot a_a2_ roartook 22

将输入中的[4]|*全部替换为2$ echo '2.3/[4]|*6 foo 5.3-[4]|*9' | awk '____________________'2.3/26 foo 5.3-29

打印所有以hand开头且其后为空或以s、y或le结尾的行$ echo -e 'handed\nhand\nhandy\nunhand\nhands\nhandle' | awk '____________________'handhandyhandshandle

答案查题题库