我有一个带有此脚本的sh文件:
#!/bin/bash
echo "Scripts para limpiar los JS"
find . -type f -name "*.js" -print0 | xargs -0 sed -i "s/var _0xaae8=.*//"
echo "Finalizo la limpieza de JS"
如果我在服务器中运行此行,它可以完美地运行:
find . -type f -name "*.js" -print0 | xargs -0 sed -i "s/var _0xaae8=.*//"
但是当我在cron-job中运行脚本时,我收到此错误消息:
Scripts para limpiar los JS
sed: -e expression #1, char 19: unknown option to `s'
sed: -e expression #1, char 19: unknown option to `s'
sed: -e expression #1, char 19: unknown option to `s'
sed: -e expression #1, char 19: unknown option to `s'
find: `./.checkers': Permission denied
sed: -e expression #1, char 19: unknown option to `s'
Finalizo la limpieza de JS
我做错了什么?