Re: [OxLUG] Redirecting output in a c shell

Top Page
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Hubert Matthews
To: oxlug
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:
> pulseaudio -vv | more
> but that didn't work either and in both cases the output just kept
> streaming to the end.

Perhaps the output is being written to stderr and not stdout.  If that's
the case then in bash you would write:

  pulseaudio -vv 2>&1 > pulseaudio-output

The 2>&1 tells the shell to redirect file descriptor 2 (stderr) to the
same place as file descriptor 1 (stdout).

Apparently the C-shell equivalent is something like this:

  pulseaudio -vv >& pulseaudio-output

Hubert Matthews            
Software Consultant