Results 1 to 1 of 1
hi,
I am new to linux programming . I am writing a program to convert windows media player playlist so that it can be imported in amarok (suse 10.1) lately ...
- 04-10-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 5
few problems in shell
hi,
I am new to linux programming . I am writing a program to convert windows media player playlist so that it can be imported in amarok (suse 10.1) lately i did complete the m3u part of the code wherein .m3u made by WM player is converted so that amarok can use it, but there are some strange problems that i had come across
1) the test -f command was not working with the windows mp3 file when i run it on script. the strange thing is that when i did wc -c on the .mp3 file it gives a character more than what is being present when u actually count it.
2) the grep function also was not functioning as it used to with linux file, i think the extra character was causing the prob, i found a way by
getting .mp3 character length = wc -c
by using "cut" : filename = cut -b1-$((length-2))
then using grep -o $filename
3) lastly i checked 2 WMP .m3u and it works fine, but i found a prob with playlist wherein the file contained "é" in the file name and so it could not be converted .
the list of doubts is long but i hope somebody could help.


Reply With Quote