From: Holden Glova Date: 2000-12-30T07:46:19+09:00 Subject: [ruby-talk:8307] Re: "Catching" "command not found" when using backquotes? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello On Sat, 30 Dec 2000 03:15, I think Robert Feldt wrote: > Hi, > > Is there some way of preventing the "command not found" printed by Ruby > when the command specified in backquotes isn't found? The example in the > book (p. 75) shows how to get an exception back when this happens but it > doesn't avoid printing the "command not found" message to stderr. > > Regards, > > Robert You could redirect all stderr to /dev/null for example, say you want to the date, but you typo'd and typed day instead of date. `day 2>/dev/null` That will redirect all your stderr straight to bit-bucket heaven. Hope that helps you out. - -- Signed, Holden Glova -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE6TRPAzrxa+Gy/b/4RAsMqAJ9Di7rjFaVGgUZubAHTS0jF5wDAmQCdE9jj e3MOXIHGPJ+5qBvLwZFnmBY= =qdvO -----END PGP SIGNATURE-----