[root@centos8 ~]#sed -i.orig '2d;4d' seq.log [root@centos8 ~]#sed -i '/^listen 9527/a listen 80 \nlisten 8080' /etc/httpd/conf/httpd.conf #删除所有以#开头的行 [root@centos8 ~]#sed -i '/^#/d' fstab #只显示非#开头的行 [root@centos8 ~]#sed -n '/^#/!p' fstab 范...
$ sed -i'.orig' 's/linux/unix/gi' /etc/passwd $ ls /etc/passwd.* passwd passwd.orig 小括号反向引用 代码语言:javascript 复制 $ sed 's/\(unix\)/learn \1/g' /etc/passwd 仅当符合某条件时才进行内容替换 代码语言:javascript 复制 sed '/learn/s/unix/linux/g' /etc/passwd 当行中同时...
[1325–75; Middle English < Medieval Latin, Late Latinpāgānusworshiper of false gods, orig. civilian (i.e., not a soldier of Christ), Latin: peasant, n. use ofpāgānusrural, civilian, derivative ofpāgusvillage, rural district; see-an1] ...
[root@centos8 ~]#seq 10 > seq.log[root@centos8 ~]#sed -i.orig '2d;4d' seq.log[root@centos8 ~]#sed -i '/^listen 9527/a listen 80 \nlisten 8080'/etc/httpd/conf/httpd.conf#删除所有以#开头的行[root@centos8 ~]#sed -i '/^#/d' fstab#只显示非#开头的行[root@centos8 ~]#s...
sed -i'.orig' 's/this/that/gi' myfile.txt Use sed to Edit and Backup Original File 12. Switching Pairs of Words in a File Let’s suppose you have a file containing full names in the formatFirst name,Last name. To adequately process the file, you may want to switchLast nameandFirs...
[08:52:25 root@centos8 ~]#cat seq.log.orig 1 2 3 4 5 6 7 8 9 10 [08:52:31 root@centos8 ~]#cat seq.log 1 3 5 6 7 8 9 #删除所有以#开头的行 [root@centos8 ~]#sed -i '/^#/d' fstab #只显示非#开头的行 [root@centos8 ~]#sed -n '/^#/!p' fstab ...
~]#: sed -i.orig ‘s/dog/cat/g’ pets 备份后再替换 ~]#: sed ‘2a\dog cat dog cat cat’ pets 在第二行后增加新行 ~]#: sed ‘2i\dog cat dog cat cat’ pets 在第二行前增加新行 ~]#: sed ‘2c\dog cat dog cat cat’ pets ...
v.i. 3. to sleep in any convenient place. [1775–85; orig. obscure] doss′er, n. Random House Kernerman Webster's College Dictionary, © 2010 K Dictionaries Ltd. Copyright 2005, 1997, 1991 by Random House, Inc. All rights reserved. ...
+ exit +fi + +src=de +tgt=en +lang=de-en +prep=iwslt14.tokenized.de-en +tmp=prep/tmp +orig=orig + +mkdir -p $orig $tmp $prep + +echo "Downloading data from ${URL}..." +cd $orig +wget "$URL" + +if [ -f $GZ ]; then + echo "Data successfully downloaded....
$ sed -i'.orig' 's/linux/unix/gi' /etc/passwd $ ls /etc/passwd.* passwd passwd.orig 小括号反向引用 $ sed 's/\(unix\)/learn \1/g' /etc/passwd 仅当符合某条件时才进行内容替换 sed '/learn/s/unix/linux/g' /etc/passwd