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" but without success ;-) how do i do that??
in mind i want something like that:
yeah= mp3info -p %a $1
// DAMNiAM //
See http://www.tldp.org/LDP/abs/html/ for more info.
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.
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)