我想用sed
從我的crontab文件中刪除一行。首先,我將用戶的crontab保存在文件text.txt
中。然後我想刪除這一行:Sed操縱crontab的行
*/5 * * * * svn update /root/tamainut/schedule/generico.sh && sh /root/tamainut/schedule/generico.sh
我認爲問題是與字符,但我迷路了。我想:
sed '*/5 * * * * svn update \/root\/tamainut\/schedule\/generico.sh && sh \/root\/tamainut\/schedule\/generico.sh/d' text.txt
sed: -e expresión #1, carácter 1: unknown command: `*'
我想:
sed '\*/5 \* \* \* \* svn update \/root\/tamainut\/schedule\/generico.sh && sh \/root\/tamainut\/schedule\/generico.sh/d' text.txt
sed: -e expresión #1, carácter 115: unterminated address regex
我要去哪裏錯了?