I am using egrep -R
followed by a regular expression containing about 10 unions, so like:
.jpg | .png | .gif
etc. This works well, now I would like to replace all strings found with .bmp
I was thinking of something like
egrep -lR ".jpg|.png|.gif" . | sed "s/some_expression/.jpg/" file_it_came_form
so the issue here is how do I do a similar union regular expression in sed
and how do I tell it to save the changes to the file that it got the input from.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…