Last active
August 14, 2025 12:49
-
-
Save felipyamorim/bc5982c3665ae43a7400535c9cdd8328 to your computer and use it in GitHub Desktop.
csv
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
| find . -type f -name '*.csv' -exec \ | |
| sed -E -i.bak ":a; s/(\[|,)\s*'([^']*)'\s*(,|\])/\1\2\3/g; ta" {} + | |
| find . -type f -name '*.csv' -exec \ | |
| sed -E -i '' ":a; s/(\[|,)\s*'([^']*)'\s*(,|\])/\1\2\3/g; ta" {} + | |
| find . -type f -name '*.csv' -exec sed -E -i .bak "s/'([0-9A-Za-z]+)'/\1/g" {} + | |
| find . -type f -name '*.csv' -exec \ | |
| sed -E -i.bak "s/(\[|,)[[:space:]]*'([^']*)'[[:space:]]*(,|\])/\1\2\3/g" {} + | |
| echo "1234,company,34.44,Felipy'amorim,['123','445']" \ | |
| | perl -pe 's/\[([^]]*)\]/"[".(my $x=$1)=~s{\047}{}gr."]"/eg' | |
| find /caminho/para/pasta -type f -name "*.csv" \ | |
| -exec perl -i.bak -pe 's/\[([^]]*)\]/"[".(my $x=$1)=~s{\047}{}gr."]"/eg' {} + | |
| find /caminho/para/pasta -type f -name "*.csv" \ | |
| -exec cp --parents {} /caminho/backup/ \; \ | |
| -exec perl -i -pe 's/\[([^]]*)\]/"[".(my $x=$1)=~s{\047}{}gr."]"/eg' {} + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment