Answer the question
In order to leave comments, you need to log in
sed error, why?
Hello. The essence of the problem: if run through sh s.sh script works
through cron - no.
mistake:
sed: -e expression #1, char 73: strings for `y' command are different lengths
sed: -e expression #1, char 73: strings for `y' command are different lengths
if [ -n "$Downloads_folder" ]; then
# sed-ом заменяем символы кирилицы на символы латиницы
TRS=`echo $Downloads_file | sed "y/абвгдезийклмнопрстуфхцы/abvgdezijklmnoprstufxcy/"`
TRS=`echo $TRS | sed "y/АБВГДЕЗИЙКЛМНОПРСТУФХЦЫ/ABVGDEZIJKLMNOPRSTUFXCY/"`
#Библиотека замен
shopt -s nullglob
TRS=${TRS// /_};
TRS=${TRS//WEB-DL/};
TRS=${TRS//_./.};
TRS=${TRS//1080p/};
TRS=${TRS//(/};
TRS=${TRS//)/};
TRS=${TRS//ч/ch};
TRS=${TRS//Ч/CH};
TRS=${TRS//ш/sh};
TRS=${TRS//Ш/SH};
TRS=${TRS//ё/jo};
TRS=${TRS//Ё/JO};
TRS=${TRS//ж/zh};
TRS=${TRS//Ж/ZH};
TRS=${TRS//щ/sh\'};
TRS=${TRS///SH\'};
TRS=${TRS//э/je};
TRS=${TRS//Э/JE};
TRS=${TRS//ю/ju};
TRS=${TRS//Ю/JU};
TRS=${TRS//я/ja};
TRS=${TRS//Я/JA};
TRS=${TRS//ъ/\`};
TRS=${TRS//ъ\`};
TRS=${TRS//ь/\'};
TRS=${TRS//Ь/\'}
echo $TRS
fi
Answer the question
In order to leave comments, you need to log in
the most common you stupidly specified /scrypt.sh
but in cron there is no $PATH by default
, you need to specify the path to the interpreter
/bin/bash scrypt.sh
, better show what you have in the cron
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question