[arch-general] Impossible redirect console buffer to log

Chris Billington chrisjbillington at gmail.com
Fri Mar 1 19:07:46 UTC 2019


This is pretty strange.

As for the script command, it can be passed the command to run, but I am
guessing it will have the same symptoms as with 'unbuffer':

[bilbo:~]$ script -c 'echo hello' mylogfile.log
Script started, file is mylogfile.log
hello
Script done, file is mylogfile.log
[bilbo:~]$ cat mylogfile.log
Script started on 2019-03-01 14:05:28-05:00 [TERM="xterm-256color"
TTY="/dev/pts/0" COLUMNS="137" LINES="24"]
hello

Script done on 2019-03-01 14:05:28-05:00 [COMMAND_EXIT_CODE="0"]

On Fri, Mar 1, 2019 at 1:40 PM Maykel Franco via arch-general <
arch-general at archlinux.org> wrote:

> El vie., 1 mar. 2019 a las 19:30, Ralph Corderoy
> (<ralph at inputplus.co.uk>) escribió:
> >
> > Hi Maykel,
> >
> > > > command &> out
> > >
> > > Not works... I probe all combinations:
> > >
> > > > file redirects stdout to file
> > > 1> file redirects stdout to file
> > > 2> file redirects stderr to file
> > > &> file redirects stdout and stderr to file
> >
> > Can you show us one complete command with `&>' in case there's something
> > else wrong?
> >
> > Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
> > will capture the write(2)s or similar and you can see what file
> > descriptors its writing to and work backwards to see how that was
> > obtained, e.g. by opening /dev/tty.
> >
> > --
> > Cheers, Ralph.
>
> Nothing happens, it closes and the process does not start
>
> root at arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
> root at arch:~#
> root at arch:~#
>


More information about the arch-general mailing list