Page 1 of 1

[RESOLVED] Sending URL Variable to Bash Script by FlashGot

Posted: Thu Nov 12, 2009 8:50 pm
by jayjaygibbs
I'm trying to run a simple script from Firefox using Flashgot:

Code: Select all


#! /bin/bash
sp-sc $1 8908 8909 & 
#TRYING TO SET $1 as URL Variable
sleep 5 && vlc http://localhost:8909

I am aware that there are better ways of starting sp-sc but once I can suss this out it will lead to some more useful things for me.

I set Flashgot to run my simple script but I can't seem to find a way to set the url link to a variable e.g $1

Any help, or comments, would be really appreciated.

Re: Trying to parse URL variable to Bash Script using Flashgot

Posted: Thu Nov 12, 2009 9:02 pm
by Giorgio Maone
You should setup a custom download manager entry with executable /bin/bash and arguments template:

Code: Select all

/path/to/my/script.sh [URL]

Re: Trying to parse URL variable to Bash Script using Flashgot

Posted: Fri Nov 13, 2009 7:56 pm
by jayjaygibbs
Thanks for your post but I'm not sure I understand what you mean.

I'm trying to set the [URL] to a variable that I can use in my script.

What is the variable of [URL] if I set the download manager like you say?

Re: Trying to parse URL variable to Bash Script using Flashgot

Posted: Fri Nov 13, 2009 8:33 pm
by jayjaygibbs
SORRY!!! I got it. Thanks a lot. I didn't put the $1 variable in single quotes.

Code: Select all

sp-sc '$1' 8908 8909 & 
It should have been this.

Thank you soooooo much. This is really useful!!

Re: [RESOLVED] Sending URL Variable to Bash Script by FlashGot

Posted: Sat Nov 14, 2009 2:10 pm
by therube
(Since I didn't know what SopCast was ... is a simple, free way to broadcast video and audio or watch the video and listen to radio on the Internet.)