1
What I’d like to do is more or less that:
ls -l | xargs sed’s/regex of the pattern I want to replace/new data/g'
for each output of ls, a replacement is done inside the file using sed. Can you do it? There would be a more efficient way?
1
What I’d like to do is more or less that:
ls -l | xargs sed’s/regex of the pattern I want to replace/new data/g'
for each output of ls, a replacement is done inside the file using sed. Can you do it? There would be a more efficient way?
0
I was able to find an alternative to edit all the files inside the directory:
sudo find . -type f -name "*. txt" | xargs sed -i "s/data"
Browser other questions tagged linux command-line sed
You are not signed in. Login or sign up in order to post.
sed -i 's/dadosAntigos/novosDatas/g' *.txt
?– JJoao