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/* root@192.168.0.183:/var/mobile/Media/Music

copies music to Ipod via SSH

  • It's not really efficient to scp all files in ~/Music, especially if the folder gets big. – Lekensteyn Mar 6 '11 at 9:26
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/* root@192.168.0.183:/var/mobile/Media/Music

Usage:

./mus.sh ARTIST
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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