Comment

Comment by cillian64

sed can be used to edit files (with the -i option). Not sure how this interacts with piping to its STDIN, but I wouldn't automatically assume `grep | sed` is safe.

I was thinking about this the other day, standard UNIX utilities seem poorly suited for this because they have so many weird options/flags with "unsafe" side effects. I have no idea if grep, for example, has some niche option to make it write/edit/delete files, so I wouldn't be comfortable blanket whitelisting it.

parent cillian64 2 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton