Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • I actually tried this before. The error is sed: -e expression #1, char 19: unknown option to `s'. I have to say, that the grep results are strange, because all the files where the expression is found are one after another in one row without any space between the two found files. Commented Aug 19, 2016 at 15:14
  • 1
    You probably tried with s/.../.../ instead of s:...:...: and so had an issue with the embedded / in {fig/. With -lZ, the file names are NUL delimited so it can be safely handled by xargs (with -0). The NUL character is invisible when sent to a terminal. Commented Aug 19, 2016 at 15:17
  • Oops, I have a new problem. Some of the lines are already with extensions png. Ofoucrse, now all of them have been appended with an added .png :D. Is there a way to just do the substitution only if there isnt a png in the end.. I know basics of regex, but these are quite complicated expressions. Commented Aug 19, 2016 at 15:28