Recently installed Plex on my debian server and tried to play around with some logging and MRTG graphing, mainly to learn some useful grep, awk, wc and cut commands.
For example,
Code: Select all
#!/bin/bash
export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
/usr/lib/plexmediaserver/Plex\ Media\ Scanner -l -c 3 | wc -l > no_songs.txt
echo 0 >> no_songs.txt
Code: Select all
Plex\ Media\ Scanner -l -c 1
Code: Select all
Plex\ Media\ Scanner -l -c 3
Code: Select all
Plex\ Media\ Scanner -l -c 3 | cat
Code: Select all
Plex\ Media\ Scanner -l -c 1 | cat
Code: Select all
Plex\ Media\ Scanner -l -c 1 > file
No difference if I create a shell script, pipe the result to a file first or go straight to | wc, tried piping to awk, piping both stdout and stderr with &> or anything similar, the result just disappears when I try to do anything else but show it on screen.
I have never encountered anything similar. What to look for? What could cause this?