Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. COUNTER=0;
  2. inotifywait -m --format '%f' -e moved_from,moved_to ./ | while read FILE
  3. do
  4. if [ $COUNTER -eq 0 ]; then
  5. FROM=$FILE;
  6. COUNTER=1;
  7. else
  8. TO=$FILE;
  9. COUNTER=0;
  10. echo "sed -i 's//$FROM)//$TO)/g' /home/a/b/c/post/*.md"
  11. sed -i 's//'$FROM')//'$TO')/g' /home/a/b/c/post/*.md
  12. fi
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement