n-abounds said:
Is there a simpler script if the other person does have "iPod" in the name of their iPod?
Well yeah you could do this really simply, though I have to say if you want this to work with just a simple command line argument I don't think it's possible without creating at least one temporary file to store information so your best bet would be a script. Though maybe
plinden can correct me if I'm wrong on that.
So simpler as you want it.. with this following script which will find any variation of iPod (ipod IPOD ipOd etc.. excluding dot files) in /Volumes and then go to the directory.
Like this for example..
Code:
#!/bin/ksh
ipod=`ls /Volumes/ | grep -i iPod`
if [ -n "$ipod" ];then
cd /Volumes/"$ipod";
ls;
else echo 'Cannot find the iPod! OMG what now?! Buh bye.'
fi
NOTE: Some flaws can be found with this route..
a)the users iPod must have the word iPod in the name
b)if another drive is mounted with the word iPod in the name, conflicts arise (i.e. backup iPod music cd, etc) (though this could be remedied by checking to see if the directory has write access, though you would still have problems with CD/DVD-RW's and external drives)
c)this wont work with non mounted ipods not in disk mode (of course neither does the prior script deal with this problem either)