Не могли бы вы, ребята, проверить приведенное ниже сообщение и предоставить мне любое решение или подсказку для решения проблемы с переменной цикла.
Файлы, которые у меня есть в следующем формате:
/directory/file1.gz -> gunzip file1, it will be in ascll format
/directory/file2.gz -> gunzip file2, but the file2 still in gzip format
ДляОчистив эту проблему, я написал ниже небольшой скрипт:
for f in ./ETF_Directories_*/*;
do
if file -z "$f" | grep -i ascii
then
echo "file is in ascii format"
else
gunzip "$f"
//**If the file is not in ascii format I mean the second case I want to
move this gunziped file to .gz. So that it will in single .gz format, but
I need command to write, or hint on how to use "mv" command to achieve
what I needed**//
fi
done