Need help with simple scripting
Hello all,
I am trying to launch Xine and then queue some files into Xine without using a conventional play list file. So far, I have discovered that from a terminal I can: 1) I can launch Xine and specify a session ID using: Code:
xine -S --session=0 & Code:
xine --enqueue -S session=0 /media/Video/v/a_file.mpg Code:
xine --enqueue -S session=0 /media/Video/v/b_file.mpg How would I get this to work in a script that I could execute once, without having to manually issue the three commands in the terminal? Hope this is making some sense and someone is happy to help. Regards, Greenie |
Why don't you simply start xine as xine <first file> <second file>??
|
Quote:
What I ultimately want to do is write a script that randomly chooses a filename from a list and chooses a volume setting from same list (text file list) and injects the filename and volume setting into a running instance of xine. I can do this by command line, so surely a script can do it. I just not sure how. I've tried to write one but cannot get it to work (my script keeps launching multiple instances of xine, I have to close each instance one by one for the next instance to start). |
Well, let's see your attempt.
|
Quote:
Code:
xine -S --session=0 & I suspect that my approach on the first line is way incorrect, but I don't know what would be correct way of doing this. |
So you're issuing this as "sh whatever" ?.
Try adding "#!/bin/sh" as the first line, make it executable and run it. |
Quote:
Not really the xine behaviour I wanted, it does not behave the same way as it does if I issue those same commands manually in a terminal window. |
Since the exact same commands work if a slow old human enters them, I figured that the script is running too quickly and each command is not realising that Xine is already running.
And this seems to work: Code:
#!/bin/sh |
All times are GMT -5. The time now is 06:45 AM. |