Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #166834
| From | Michael Milliman <michael.e.milliman@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: My script almost works but spams the terminal its launched from if useing dash. |
| Date | 2016-04-17 15:40 +0200 |
| Message-ID | <roV5E-54M-3@gated-at.bofh.it> (permalink) |
| References | <roUCC-4PT-11@gated-at.bofh.it> <roUVX-4Z7-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/17/2016 08:28 AM, Thomas Schmitt wrote: > Hi, > > Jeremy Nicoll wrote: >> would anyone ever code: >> bin/mailwatcher 2>&1 >/dev/null >> when surely all they need is >> bin/mailwatcher >/dev/null > Interesting question. (Like what is the use case of cat(1) ?) > Surely this is one of the less useful variations of the rules > for redirection. > > > Let's assume a subordinate script which expects to get started > with stdout redirected to some non-vanilla target. > For some reason it could decide to direct the stderr of one of > its own sub-subordinate scripts to stdout as prepared by its > superior script and to direct the sub-subordinate stdout to /dev/null. > > Superior: > > subordinate | result_consumer > > Subordinate > > ... > echo "Note: Switching to diagnostic output mode" > subsubordinate 2>&1 >/dev/null > ... > > Subsubordinate: > > ... some (in this case) invalid output to stdout ... > echo "Failed because ..." >&2 > ... > > > Have a nice day :) > > Thomas > Wow, that's pretty arcane, but pretty cool as well. While understanding how redirection works, I had never considered such a case. It does point out the power of the redirection options available, though. -- Mike
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-16 17:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Aero Maxx <aero.maxx.d@gmail.com> - 2016-04-16 18:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-16 18:50 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Aero Maxx <aero.maxx.d@gmail.com> - 2016-04-16 19:20 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-17 00:50 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Michael Milliman <michael.e.milliman@gmail.com> - 2016-04-17 08:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Jeremy Nicoll <jn.ml.dbn.25@letterboxes.org> - 2016-04-17 13:00 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-17 13:50 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Jeremy Nicoll <jn.ml.dbn.25@letterboxes.org> - 2016-04-17 15:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-17 15:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Michael Milliman <michael.e.milliman@gmail.com> - 2016-04-17 15:40 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Jeremy Nicoll <jn.ml.dbn.25@letterboxes.org> - 2016-04-17 16:40 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Michael Milliman <michael.e.milliman@gmail.com> - 2016-04-17 15:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-17 13:50 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-04-22 06:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Michael Milliman <michael.e.milliman@gmail.com> - 2016-04-22 07:00 +0200
Re: Re: My script almost works but spams the terminal its launched from if useing dash. Clive Standbridge <list-user@tgstandbridges.plus.com> - 2016-04-22 11:40 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-22 10:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. David Wright <deblis@lionunicorn.co.uk> - 2016-04-22 13:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Sven Joachim <svenjoac@gmx.de> - 2016-04-16 18:50 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-16 19:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Linux-Fan <Ma_Sys.ma@web.de> - 2016-04-16 19:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-16 20:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-17 01:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. David Wright <deblis@lionunicorn.co.uk> - 2016-04-17 04:30 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-17 06:50 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. David Wright <deblis@lionunicorn.co.uk> - 2016-04-18 16:00 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-18 20:50 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-17 14:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-17 14:10 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. Gene Heskett <gheskett@shentel.net> - 2016-04-17 15:20 +0200
Re: My script almost works but spams the terminal its launched from if useing dash. "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-17 16:40 +0200
csiph-web