Lets say you would like to hear the same DJ every day . You have a music list and you would like to play the same music and its located at
"/media/New-Drive/Dj"
now i will write a script that will play same music for you everyday .
1.Open Terminal (Cntl+Alt+T)
2.Make a folder called "music" at your Desktop , the location of your script will be /home/user/Desktop/music for me user="anuj"
3. type on terminal " cd /home/user/Desktop/music "
4. type "gedit dj" here our script name is "dj"
5. copy and past the following on your dj file
#!/bin/sh
cd /media/New-Drive/Dj
gnome-open *.mp3
exit 0
save your script
6.type chmod +x dj
7.lastly ./dj
8.now type every time you restart the PC just open terminal type cd /home/user/Desktop/music and ./dj dats all .
enjoy
Script To Play Same Music list
Linux shell scripting
No comments:
Post a Comment