I'm new to bash and I have a question about parsing the output of the command. I have 3 processes that have the same name "process" and the process have some parameters, for example:
process -a 10 -b 20 -c 30 ...
process -a 15 -b 30 -c 40 ...
process -a 30 -b 40 -c 50 ...
I have to handle the 'a' parameters and assign them to an array if the processes exist. İf they don't exist, I have to restart the process. I am handling the processes with:
`$PS -ef|$GREP -v grep|$GREP process`
This gives me the running processes and I have to see which process does not run and restart it with the help of 'a' parameter.
How can I achieve this?