Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Subject may be misleading. This isn't actually a question, but rather a simple hack I created. Kplayer is an MPlayer front-end for KDE with a playlist and some cool features. One feature I immediately noticed missing though, was the lack of importing standard playlists (i.e from XMMS). Kplayer stores a file in the users home directory where it pulls playlist information from. I created a simple shell script which converts a user-specified playlist into the rc file used by kplayer. If the script is named "kconvplaylist" and your playlist "ambientmix.m3u", you'd simply type "kconvplaylist ambientmix.m3u" and, voila, next time you open kplayer your playlist has been imported.
Here's the shell script. Hopefully someone else can get some use out of it as well :-)
#m3u to kplayerplaylistrc conversion script
#Remove comments from m3u (currently ambientmix.m3u for this test)
grep -i '.mp3' $1 > /tmp/test.m3u
grep -i '.ogg' $1 >> /tmp/test.m3u
#Get word count of temp m3u and output to file to be analyzed by cut
wc -l /tmp/test.m3u > /tmp/countraw
#Take out tab by filtering through string
echo $listcount > /tmp/countraw
#Print out first line in file
echo '[Playlist Entries]' > ~/.kde/share/config/kplayerplaylistrc
#Print out total Entries line
echo 'Entries='$(cut -d' ' -f1 /tmp/countraw) >> ~/.kde/share/config/kplayerplaylistrc
#Main loop to number and label lines
cat /tmp/test.m3u | while read cur_line
let "a=$a + 1"
echo "Entry $a=$cur_line" >>~/.kde/share/config/kplayerplaylistrc