I need to find both 150+ eventType and errorCodes in 1700 files each day. That means i have to loop over 1700 files to find the occurrence count of 150+ eventType/errorCode and put those counts in a text file as a daily report. I have placed those eventType/errorCode values in a text file separated by commas: My initial code: The
Tag: loops
bash process monitor script echo empty when no process found
I’ve created a process monitor to check for the presence of a running process, and if found we need to check its parent to determine if it is acceptable or not, it’s a security check basically. It works great when I look for running processes and gives me output that I expect. However, for some reason when no process is
Optimizing C for loops [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed 6 years ago. Improve this question I have been trying to optimize my program so far I got down to 8 seconds but my goal its to
Select in loop – work all the time – linux
I got next question about select: How to make select in loop ? I try to do like that: But there all the time show: ,, no communicate”. Is it the correct way to create select which work all the time? I am not sure so I prefer to ask. I try to find information in books but with no
iterating ssh-copy-id command to copy on multiple hosts
I am trying to copy public key to my multiple hosts in a file called “hostsfile”. I am writing a script that will allow me to do that as I am setting a dev environment and I may end up doing it over and over. Googling around I have been able to place insert the public key using ssh-copy-id command
How to gzip all files in all sub-directories in bash
I want to iterate among sub directories of my current location and gzip each file seperately. For zipping files in a directory, I use but this can just work on current directory and not the sub directories of the current directory. How can I rewrite the above statements so that It also zips the files in all subdirectories? Answer No
questions about implementing pyinotify instance to monitor directory
I have some basic questions about pyinotify that I can’t seem to find the answers to elsewhere. 1) For a continuous directory monitor (and event processor) is it necessary to have a while( True ) loop or is the continuous event ‘loop’ handled by the notify watch and ended when I remove the watch? 2) What happens if files are