On 21:03 08 Dec 2002, Radu Popa <[EMAIL PROTECTED]> wrote:
| I am curently trying to make my first mp3 box. I use mp3blaster wich is configured 
|to send the output to
| a file called current_info_mp3. The output looks something like this:
| 
| path song.mp3
| status playing
| mode JointStereo
| format MPEG 1 layer 3
| bitrate 128
| samplerate 44100
| length 195
| next next_song.mp3
| 
| 
|     My question is how can I break apart the lines in the file so as a result I 
|would have individual
| files containing the information, meaning a file containing as text the path, 
|another one the status, and
| so on, because I would like to send this info to an lcd display.
|     My kind request is that you provide some authentic examples of doing it, because 
|I have tried to do
| this with some text handling commands (cat, awk, grep) but I still cant make it 
|work. Also I would like
| to remove the description before parameters ("path", "status", "mode", etc.).

Something like this may be a start:

        while read param value
        do  echo "$value" >"$param"
        done <current_info_mp3

should produce a file named after each parameter. Untested code, but
looks ok to me.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

"I wish it need not have happened in my time," said Frodo.
"So do I," said Gandalf, "and so do all who live to see such times.  But that
is not for them to decide.  All we have to decide is what to do with the time
that is given us."



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to