Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need help making a script that would do this

This is what I would do manually in terminal (I will be using the .getmusic script from 360 percents to download myspace music):

cd /home/eric/Music

to make sure music gets downloaded to /home/eric/Music:

/home/eric/getmusic.sh http://www.myspace.com/ARTIST

I would like to be able to enter the clipboard text automatically (I don't know how to) in place of "Artist"

music is downloaded to /home/eric/Music in .mp3 format

scp -r /home/eric/Music/* [email protected]:/var/mobile/Media/Music

copies music to Ipod via SSH

share|improve this question
    
It's not really efficient to scp all files in ~/Music, especially if the folder gets big. –  Lekensteyn Mar 6 '11 at 9:26

1 Answer 1

up vote 3 down vote accepted

Create mus.sh and make it executable (chmod +x mus.sh):

#!/bin/sh
cd /home/eric/Music
/home/eric/getmusic.sh "http://www.myspace.com/$*"
scp -r /home/eric/Music/* [email protected]:/var/mobile/Media/Music

Usage:

./mus.sh ARTIST
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.