Re: [arch-general] Impossible redirect console buffer to log

2019-03-03 Thread Ralph Corderoy
Hi Maykel,

> > This will remove the carriage returns at the end of lines once
> > script has finished.
>
> This not working. Not quit the end file log character "^M"
>
> > script -f -c '/usr/local/bin/cccam -d' mylogfile.log
> > sed -i 's/\r$//' mylogfile.log

It works here.

$ script -f -c 'seq 3' mylogfile.log
Script started, file is mylogfile.log
1
2
3
Script done, file is mylogfile.log
$ od -c mylogfile.log | fgrep '\r'
140   L   I   N   E   S   =   "   4   0   "   ]  \n   1  \r  \n
160   2  \r  \n   3  \r  \n  \n   S   c   r   i   p   t   d   o
$ sed -i 's/\r$//' mylogfile.log
$ od -c mylogfile.log | fgrep '\r'
$

Does that od(1) pipeline show any carriage returns in mylogfile.log for
you after you have run the sed command?  What you call `^M', od shows as
`\r'.

-- 
Cheers, Ralph.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-03 Thread Maykel Franco via arch-general
El sáb., 2 mar. 2019 a las 10:23, Ralph Corderoy
() escribió:
>
> Hi Maykel,
>
> > Now only remove ^M character from log files in buffer time but this
> > not working:
> >
> > script -f -c '/usr/local/bin/cccam -d' mylogfile.log | sed 's/^M//g'
>
> script(1) writes to mylogfile.log, sed sees no input.
> This will remove the carriage returns at the end of lines once script
> has finished.
>

This not working. Not quit the end file log character "^M"

> script -f -c '/usr/local/bin/cccam -d' mylogfile.log
> sed -i 's/\r$//' mylogfile.log


>
> > https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64
>
> It's an executable, no source, no documentation to suggest what it will
> do, so I'm not going to run it.  :-)

Yes, I know.

>
> --
> Cheers, Ralph.