You are not logged in.
Pages: 1
hi!
i am writing a batch script and would like to know if you can do the following:
in my script i want to use: mp3info -p %a $1 , this prints the "artist" of a given file to the terminal. but i want to store this in a string! i tried " > yeah[0]" but without success ;-) how do i do that??
in mind i want something like that:
yeah[0]= mp3info -p %a $1
echo -----
echo name:
echo ${yeah[0]}
echo -----
greetings matto
// DAMNiAM //
Offline
bla=`echo bla`
See http://www.tldp.org/LDP/abs/html/ for more info.
Offline
My bash knowledge is a bit rusty but this might work:
artist=`mp3info -p %a $1`
echo $artist
I have nothing to say, and I am saying it.
Offline
This is newbie corner, so the original poster probably won't notice tha those are back tics, and not apostrophes around the command. IE: the thingy under the tilde (~) key in the upper left corner.
A more nestable syntax that is recommended by modern bash is:
artist=$(mp3info -p %a $1)
Dusty
Offline
Pages: 1