标签:ASDK 核心 dfa code color root sda shell als
[root@server01 ~]# vi 1.txt 1111111111111111111 121212aaasdasdf asdfasdfasdfasdfasdf 12121212aklsdfjaklsdfkjk *****#)#((@#*@)1121212 root@gitlba-aming shell100 12aaasdas23asdfasdf asdf;lkjas;lkdjfkl;ajsdf asl;dkfjalskdjflkj2elkjwlkej23kijlkjasdf laksjdflkjslkdjfslkdjflksjdf 21l3k2l3k2l3kjl2k3jl2k3j askdjfklasjdflklkajlksdjfkl12323232323 asdklfjalksdf asldkfjalksdjfalksdjfklasjdf2323 aslkdjflk2k3j2lk3jl2k3j asdklfjalksjdflkj132 asdfkjalksdjf121adfavasdfads asldkfjalksdjf lkjlkjlwkerlk2j3lk21j3lkjflkasjdlkj23lkj klaj d
[root@server01 ~]# sed -n ‘1,5‘p 1.txt |sed ‘/[a-zA-Z]/d‘ 1111111111111111111 *****#)#((@#*@)1121212 [root@server01 ~]# sed ‘1,5d‘ 1.txt |sed ‘1,5s/[a-zA-Z]//g‘ @- 100 1223 ;;; ;223 21l3k2l3k2l3kjl2k3jl2k3j askdjfklasjdflklkajlksdjfkl12323232323 asdklfjalksdf asldkfjalksdjfalksdjfklasjdf2323 aslkdjflk2k3j2lk3jl2k3j asdklfjalksjdflkj132 asdfkjalksdjf121adfavasdfads asldkfjalksdjf lkjlkjlwkerlk2j3lk21j3lkjflkasjdlkj23lkj klaj d
把一个文本文档的前5行中包含字母的行删除掉,同时把6到10行中的全部字母删除掉。
sed命令
标签:ASDK 核心 dfa code color root sda shell als
原文地址:https://www.cnblogs.com/liujunjun/p/14415542.html