tools4j/unix4j

How to validate sed script?

Opened this issue · 1 comments

Is there a way to check if a string is a valid sed script?

You can do a try-catch around the sed call. Invalid sed scripts will cause an exception.

Note that exit value is currently only used for sort with the check option.