I have a script that processes files based on drop folders, I created a function to do the processing and based on a set of variables I process a folder
funtion filedetect { // <some processing code code> // } folder=1 source="/dir_1/" reciep="[email protected]" filedetect folder=2 source="/dir_2" reciep="[email protected]" filedetect Now I would like to add a piece of code to create 1 text file with a counter that basically counts how many files are found and processed in each folder. That is why I added the variable 'folder' so that the text file contains something like:
FOLDER 1 = [count] FOLDER 2 = [count] etc. But for that I need to read by line the previous 'count' and replace that with count=count+1
How do I read the correct line based on the text file?