Thread: Shell scripting for a total noob
making way open mp3's in xmms2 learn sh script
here's code
#!/bin/bash
x=$( pwd )
x2=$( echo $x/$1 )
x3=$( echo $x2 | sed 's/ /\\ /g')
x4=$( echo xmms2 add $x3 )
xmms2 stop
xmms2 clear
$x4 <----------(crashes here.)-(error: invalid url: 6\)
echo $x4 <--(when paste output terminal works)
xmms2 play
think runs $x4 "xmms2 add $x3"
.:and:.
xmms2 doesn't know how add variable playlist.
there way convert $3 plaintext , put command before xmms runs it?
+5 internets whoever can help!
is there particular reason why sequence of echos captured serve variables down road?
$pwd , $1 variables put in double quotes prevent segmentation on spaces assume wanted achieve sed line.code:#!/bin/bash xmms2 stop xmms2 clear xmms2 add "$pwd"/"$1" xmms2 play
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [kubuntu] Shell scripting for a total noob
Ubuntu
Comments
Post a Comment