摘要:
1、行操作 sedcat txt | sed '2d‘ // 删除第2行cat txt | sed '2,5d’ // 删除第2-5行'cat txt | sed '2,$d‘ // 删除第2到最后1行cat txt | sed '2a hhhhhh... 阅读全文
摘要:
1、行操作 sed cat txt | sed '2d‘ // 删除第2行 cat txt | sed '2,5d’ // 删除第2-5行' cat txt | sed '2,$d‘ // 删除第2到最后1行 cat txt | sed '2a hhhhhhh' // 第2后加上一行hhhhhhh 阅读全文
摘要:
grep 't[ae]st' myTxt // 查找 tast 或test grep '[^g]oo' myTxt // 查找含有oo,但前面没有g grep '[^a-zA-Z]oo' myTxt // 查找含有oo,但前面没有字母 grep '^the' myTxt // 查找the开头 gre 阅读全文
摘要:
grep 't[ae]st' myTxt // 查找 tast 或testgrep '[^g]oo' myTxt // 查找含有oo,但前面没有ggrep '[^a-zA-Z]oo' myTxt // 查找含有oo,但前面没有字母grep '^the' m... 阅读全文
摘要:
1、切分提取 cut用":"切分[admin@VA128 ~]$ echo $PATH/opt/phoenix/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/vm... 阅读全文
摘要:
1、切分提取 cut 用":"切分 [admin@VA128 ~]$ echo $PATH /opt/phoenix/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt 阅读全文
摘要:
1、变量取消 unset [admin@VA128 ~]$ myVar='hahahaha' [admin@VA128 ~]$ echo $myVar hahahaha [admin@VA128 ~]$ unset myVar [admin@VA128 ~]$ echo $myVar 2、单双引号区 阅读全文
摘要:
1、变量取消 unset[admin@VA128 ~]$ myVar='hahahaha'[admin@VA128 ~]$ echo $myVarhahahaha[admin@VA128 ~]$ unset myVar[admin@VA128 ~]$ echo $myVar2、单双引号区别单引号与双... 阅读全文