I need to run a cronjob that will monitor a directory for files with a certain extension, when one appears I then need to run the below scripts How do I go about combining the following sed statements into one script? and also retain the original filename.?
sed 's/71502FSC1206/\n&/g' # add a carriage return to all lines starting with 71502FSC1206
sed '/^71502FSC1206/s/./F/127' # add the letter F at position 127 in the line starting with 71502FSC1206
sed -e :a -e '$!N;s/\n//;ta' # remove the carriage returns