SHELL 在指定行的前/後插入指定內容

#若是知道行號能夠用下面的方法 sed -i '88 r b.file' a. file    #在a.txt的第88行插入文件b.txt awk '1;NR==88{system("cat b.file")}' a. file > a. file   #若是不知道行號,能夠用正則匹配 sed -i '/regex/ r b.txt' a.txt # regex是正則表達式 awk '/targe
相關文章
相關標籤/搜索