here is the context : i am running this on a raspberry pi
i am watching a folder for when a new file is create ([login to view URL]).
i must then read that file and use it contents for mpg321 parameters.(play sound)
then i erase the file created and wait again for a new file .. and so on...
the file can be create very fast one after the other so the mpg321 run is background and then kill himself.
i have a small script already , but need to be completed if it can help.
here is for example the contens of [login to view URL]
[login to view URL]
[login to view URL] [login to view URL]
while true; do
inotifywait -q -e create /home/watch/
rsult=$(cat /home/watch/[login to view URL])
mpg321 -q $rsult
rm /home/watch/[login to view URL]
the goal of this script is to detect when a file is create by another programme read is contents and then use it like parameters to play a notification sound. my script alredy work , but when the file is create too fast i am skipping some play.
6 freelances font une offre moyenne de 30 $ pour ce travail
Hi Naaseb, no problem at all, just award me when see my message. you have my mail too sendme a message when you want.
Hi, With such async communication, misses will happen. Do you have control over the code/program that creates the [login to view URL] file? There are two sync points here, one is the file creator and second one is the file c Plus
Hello, Can you explain the procedure step by step? like: 1) Wait for x file in y folder 2) ... I can make a c# script instead of shell script, the performance will be better.
Hi, naseeb18. I developed tools and scripts that the Development Team utilize it. I have a strong background in data processing and string manipulation using Perl, python, bash and scripting in General. I can start as Plus
I need to now "too fast" what does it mean. I can help you with a control of time input. if you have any question please don't hesitate to contact me.
Hi, I think you can separate the logic for event notification and play music so that the it can process event faster. I would love to help you handle this issue. Phuc