0

I am working on mplayer script and I am trying to get this command to ( at the same time) display on terminal and write to file. Whatever input.anyone has would be greatly appreciated. This is a command.

Mplayer -ddd-device /dev\#device dvd\\#dvdtitlenum -vf propdetect alang.eng -sid 20 and_ grep oe ']0-9[*':'[0-9,]*':'[0-9]*':,'[0-9]*'
2
  • Linux is case sensitive so you will need to fix that as Mplayer should be mplayer
    – mchid
    Aug 12, 2016 at 0:37
  • Just to clarify, do you want the video output to write to a file or the terminal output to write to a file?
    – mchid
    Aug 12, 2016 at 2:51

1 Answer 1

0

Your question has several answers here. However, reading the answers, it seems like there is a details missing, namely what your script (or mplayer) will detect as output.

  • If you do script -c myscript out.log, the programs run by myscript will detect that their output is a terminal, so they might try to produce fancier output, involving hidden control sequences, like colors and cursor movements. The file out.log will contain those sequences, too.

  • If you do myscript 2>&1 | tee out.log, the programs in myscript will detect that their output is a file, so they might disable fancier formatting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .