Last active
January 1, 2016 10:49
-
-
Save daniw/8133747 to your computer and use it in GitHub Desktop.
replace all "-" with "0"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace all "-" with "0" in test2 | |
sed -i -e 's/-;/0;/g' -e 's/-$/0/g' test2 | |
# replace all "-" with "0" in all files in local directory | |
for i in *; do sed -i -e 's/-;/0;/g' -e 's/-$/0/g' $i; done | |
# replace all "-" with "0" in all files in all subdirectories | |
for i in */*; do sed -i -e 's/-;/0;/g' -e 's/-$/0/g' $i; done | |
# replace all "-" with "0" in all *.csv files in all subdirectories | |
for i in */*.csv; do sed -i -e 's/-;/0;/g' -e 's/-$/0/g' $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment