Xref: utzoo comp.sources.wanted:9446 alt.sources.wanted:29 Path: utzoo!yunexus!ists!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!apple!oliveb!mipos3!omepd!merlyn From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.sources.wanted,alt.sources.wanted Subject: Re: separate redirection of stderr and stdout in csh. Message-ID: <5214@omepd.UUCP> Date: 17 Nov 89 18:28:24 GMT Article-I.D.: omepd.5214 References: <13928@teraida.UUCP> Sender: news@omepd.UUCP Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Followup-To: comp.sources.wanted Organization: Stonehenge; netaccess via Intel, Hillsboro, Oregon, USA Lines: 32 In-reply-to: jeffy@teraida.UUCP (Jeffrey Youngstrom) In article <13928@teraida.UUCP>, jeffy@teraida (Jeffrey Youngstrom) writes: | Hiya, | In the bourne shell I can do this: | | #!/bin/sh | | dumb_command 1> good_stuff 2> errors | | to send the output of my command to good_stuff, and | any error messages to a file called errors. | | How the heck do you do this for csh?!!! | | And don't say "well it's easy if you use perl"!!! :-) OK, I won't! (And actually, it's not even that easy :-) First, I could say, just use /bin/sh. But, at the expense of forking a second csh, you can do it with csh, as in: % (dumb_command >good_stuff) >&errors It works. (Isn't this in a "Frequently Asked Questions" posting somewhere?) Just another C-shell despiser, -- /== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\ | on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn | \== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/