I run the shell script in windows with cygwin, in which I execute the program several times with different arguments each time. Sometimes a program generates a segmentation error for some input arguments. I want to generate a text file in which a shell script can write for which of the inputs the program failed. Basically, I want to check the return value of the program every time it starts. Here I assume that when a program fails, it returns a different value from when it succeeds. I am not sure about that. The executable file is a C ++ program.
Can this be done? Please guide. If possible, provide a code snippet for a shell script.
Also, please say that all values ββare returned.
My script is a .sh file.
source share