Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Trying to find all .txt files in a deep directory and replacing
- # specific occurrences of spaces and tabs with a single space.
- # f.ex. replacing "aa bb" with "aa bb".
- # This works:
- find my_dir -iname "*.txt"
- # This works:
- sed -E -i '' $'s/aa[ \t]+bb/aa bb/g' file.txt
- # Together, they do not work:
- find my_dir -iname "*.txt" -exec sed -E -i '' $'s/aa[ \t]+bb/aa bb/g' {} +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement