My code hasn't grown much but I'm still working on it.
This is the begining of a script that I want to use. I set it as executable and put it in my users PATH for convenience. Currently it will append the current track to a designated file that I can source as a playlist for mplayer later.
Code:
lsof -d 3 | grep mplayer | cut -c 70- >> /home/dman/Music/list.txt
But to add fine tuning I would like to designate a filename after the program name in order to catagorize these lists.
example: program_name variable_name
Where variable would be a file with the name I specify after the program_name
In the above the program (getit) would look for a name (Jazz) and append to a list or create it if it doesnt exist. Thats what I would like it to do but not sure how.
Is this where I would try and insert a variable/variables?
Would an if statement be what I am looking for?
I use the following in a dedicated always on top slim terminal window to display the name of the currently played selection and it changes as the song plays. Its a little crude but it works.
Code:
watch -d 'lsof -d 3 | grep mplayer | cut -c 70-'
I am a self taught Linux user probably most people are. I say that to say this. I have no structure to follow in my journey of Linux knowledge. I just let the breeze take me in any direction that fits according to the given situation. Randomly searching topics as they come to mind. Which causes conflict when I get to a point where I should have learned something and moved onto something else instead. I'm all over the place but am definitely enjoying the ride.
