sed チートリスト

sed -e "s/^.//g" 先頭から一文字を削除

sed -e "s/^...//g" 先頭から三文字を削除

sed -e "s/\./ /"  行の中で最初の.(ピリオド)を削除

 

sed -e "/^ZZZ/s/○○○/□□□/g"   ^ZZZを条件にした行に対して○を□に置換

sed -e "/^[\t ]*$/d" testfile 空白行を削除

 

 

//参考URL
https://www.atmarkit.co.jp/ait/articles/1610/18/news008.html
https://ameblo.jp/hanmoc/entry-11217548567.html
https://xtech.nikkei.com/it/article/COLUMN/20060227/230879/
https://bi.biopapyrus.jp/os/linux/sed.html