Bueno, tengo un script bien escrito, que me da estos errores (soy novato y quizas no sepa del todo como hacer un script
Lo tengo codificado en UTF-8 y hecho por NotePad, luego lo subí por SFTP y ejecutado por SSH
root@venad1:~# ./fixp.sh
: No such file or directoryh
./fixp.sh: line 2: $'\r': command not found
./fixp.sh: line 6: $'\r': command not found
du: cannot access `/_network\r': No such file or directory
./fixp.sh: line 9: $'\r': command not found
./fixp.sh: line 13: syntax error near unexpected token `fi'
./fixp.sh: line 13: `fi'
root@venad1:~#
#!/bin/sh
# 100GB SIZE LIMIT
SIZE=0,5
MY_DIR="/_network"
# check the current size
CHECK=$(du -bs $MY_DIR|awk '{print $1}') #output Bytes
if [ $CHECK -gt $SIZE ]; then
echo "ACTION"
# find $MY_DIR -mindepth 0 -maxdepth 3 -mtime +1 -type f -exec rm {} \;
fi
Ya lo solucioné, era un error de codificadon DDOS :I