LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2007, 05:02 AM   #1
tony_stevens
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Rep: Reputation: 0
wget in konsole


Hi,

I have a problem with trying to make a shell script to down load a play list, change the name and then run "music on console" media player.
I want to download this playlist with wget http://www.shoutcast.com/sbin/shoutc...e=filename.pls
then i want to rename it 3201.pls and then run the command mocp
I have tried to write a shell script but wget downloads the file but doesnt exit and so the script doesn't work.

any help appreciated

thanks

Tony
 
Old 09-17-2007, 05:28 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

You don't post what you have so far, but this seems to work (mind the single quotes around the URL):

wget 'http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=3201&file=filename.pls'

Without the quotes the command just hangs (until enter is pressed), probably due to the & in the URL, which bash interprets (to the background) before the wget command is started.

Hope this helps.
 
Old 09-17-2007, 05:33 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
...or use the -q option of wget. Bye
 
Old 09-18-2007, 03:50 PM   #4
tony_stevens
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Original Poster
Rep: Reputation: 0
wget in konsole

Hi,

Thanks druuna and colucix for your info have the script working now.
Here is the script.

#!/bin/bash
wget -q 'http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=3201&file=filename.pls' -O 3201.pls
mocp 3201.pls

wget now downloads the file from shoutcast in quiet mode then the -O command changes the name of the file so that music on console recognizes the file.

mocp 3201.pls command runs the media player and tells it to load 3201.pls
you have to press enter to play.

I created an application link on my desktop to the shell script in my home directory, you must select run in terminal.

many thanks for your help

Tony
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
regarding wget munna_dude Linux - Networking 4 06-13-2007 06:08 AM
konsole acts as "Root Konsole" ab44045 Linux - General 11 06-11-2007 06:18 PM
about wget spx2 Linux - Newbie 7 12-19-2005 04:37 AM
Konsole and Wget safe? anticuchos Linux - Newbie 2 09-26-2005 09:44 PM
wget help Longinus Linux - Newbie 4 06-16-2004 12:09 AM


All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration