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]*'
mchid
  • 43,546
  • 8
  • 97
  • 150
  • Linux is case sensitive so you will need to fix that as Mplayer should be mplayer – mchid Aug 12 '16 at 00: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 '16 at 02:51

1 Answers1

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.

Matei David
  • 681
  • 5
  • 7