GiselleSerate / myaliases

Useful shell aliases and functions.
6 stars 1 forks source link

Sanitize output of uninstall script #22

Closed GiselleSerate closed 6 years ago

GiselleSerate commented 6 years ago

We maybe don't care that much, but printf and ed are a little noisy when they don't get what they want.

aryarm commented 6 years ago

Is ed supposed to output anything meaningful in the way we use it?

GiselleSerate commented 6 years ago

I mean, it's not like any of it will be specifically helpful to the user. Either it finds the thing and deletes it, or doesn't find the thing and doesn't delete it. It's not like the user's going to be able to interpret ed output, because when it gets confused it outputs ? and sometimes it'll output line numbers or line contents.

aryarm commented 6 years ago

So we could just redirect output to /dev/null. Does adding > /dev/null 2>&1 to the end of that one line in uninstall do what you want? It should send output from standard error and standard output to a black hole (source)

GiselleSerate commented 6 years ago

Oh, thanks, that totally works.