In the Unix bash shell script, what would be an example of searching within Unix directory for a file ("sasprog1.LOG") and then checking for an ERROR within "sasprog1.LOG" file and then opening another file ("file1.txt") and then writing some messages to "file1.txt" file?
Please note: "file1.txt" may or may not exist in the Unix directory. "sasprog1.LOG" does exist in the Unix directory.
Any examples or comments on this will be very appreciated!!