I tried searching for an answer but lost in questions. Basically I have a shell script as follows:
#!/bin/ksh
if [ $# -eq 1 ]; then
exit -1
fi
processInfo $1
At this point, processInfo returns a string of format: param1:param2:param3:param4:param5
I want to capture param4 into a variable.
ex:
param4= processInfo $1 | sed regex
It seems to be simple with sed and regex but I just lost track of it. Pls help