3 ms·
Use the best tool for the job. sed is just a DSL (domain specific language) specifically designed for for manipulating text files line by line. Note that for
by dolmen 5y ago
Use the best tool for the job.
sed is just a DSL (domain specific language) specifically designed for for manipulating text files line by line.
Note that for matching strings even in Groovy/AWK/Python/Perl/... you'll probably use regexp which are another DSL. Would you recommend to use string functions instead?
- brabel 5y ago> Would you recommend to use string functions instead? Actually, yes, of course. Regex should be the last resort, really. It's unreadable, presents security issues depending on where it's used, and much of the time using string functions in a "proper" language will be actually easier unless you're a regex expert (which is a pretty silly thing to acquire expertise on).