顯示具有 sed 標籤的文章。 顯示所有文章
顯示具有 sed 標籤的文章。 顯示所有文章

2014年7月8日 星期二

sed in shell script

sed: -e expression #1, char 14: unknown option to `s'


line="Include /2"
rep=""
sed -e "s/${line}/${rep}/g" /root/new_scripts/a.conf
sed -e "s|${line}|${rep}|g" /root/new_scripts/a.conf 
 
 
 
 
 
References :
bash - replace a string in file using shell script - Stack Overflow

2012年11月5日 星期一

Linux sed 修改登錄記錄

sed -s 's/211.xxx.xxx.xxx/192.168.1.1/g' access_log access.log  security




Reference :
some shit tips | 鬼仔's Blog

2012年3月29日 星期四

2011年11月14日 星期一