Заменить проблемную оболочку (?) / inotify wot работает правильноAndroid

Форум для тех, кто программирует под Android
Гость
Заменить проблемную оболочку (?) / inotify wot работает правильно

Сообщение Гость »


Wrote a script to monitor folders with exclude option with inotifywait and trapped into problem with substitution in command. Script:

Код: Выделить всё

exc="/data/local/tmp/1/|/data/local/tmp/2/"
mkdir -p $p1/1 $p1/2
#set -f #globbing off, no changes with this flag
#here i add * to end of each folder
[ "$exc" ] && exc="--exclude '$(sed 's@/|@/*|@g; s@/$@/*@' 

Источник: [url]https://stackoverflow.com/questions/78133237/substitute-problem-shell-inotify-wot-working-properly[/url]

Вернуться в «Android»