/bin/sed -i "[email protected]_DIR=.*@DEPLOY_DIR=/home/web/[email protected]" /home/git/bmw/si.git/hooks/post-receive
匹配post-receeive文件下的DEPLOY_DIR=字符更改为DEPLOY_DIR=/home/web/$PROJECT
/bin/sed -n "/DEPLOY_DIR/p" file 文件
查询打印字符
在指定行的前/后插入指定内容
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
时间: 2024-10-13 00:44:34