Re: [OxLUG] Redirecting output in a c shell

Top Page
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Phil Armstrong
To: Oxfordshire Linux User Group Discussion List
Subject: Re: [OxLUG] Redirecting output in a c shell
On 16/10/17 13:15, wrote:
> Can anyone help with the following, please ?
> How do I save output (several screens' worth) into a file ?
> I am using the c shell.
> I tried:
> pulseaudio -vv > pulseaudio-output
> but that didn't work (just an empty file created). I also tried to just
> view it one screen at a time (which I'd then cut and paste into an
> email) using:

That's because the output of pulseaudio -vv is being sent to stderr, not
stdout. > redirects the standout output stream to a file. You need to
redirect stderr, like so:

csh is a bad shell that can't redirect stderr by itself to a file, but
you can send both stdout and stderr to a file like so:

$ pulseaudio -vv >& pulseaudio-output

cheers, Phil