Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COUNTER=0;
- inotifywait -m --format '%f' -e moved_from,moved_to ./ | while read FILE
- do
- if [ $COUNTER -eq 0 ]; then
- FROM=$FILE;
- COUNTER=1;
- else
- TO=$FILE;
- COUNTER=0;
- echo "sed -i 's//$FROM)//$TO)/g' /home/a/b/c/post/*.md"
- sed -i 's//'$FROM')//'$TO')/g' /home/a/b/c/post/*.md
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement