2

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

1
  • It's not really efficient to scp all files in ~/Music, especially if the folder gets big.
    – Lekensteyn
    Mar 6, 2011 at 9:26

1 Answer 1

3

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .