regex - sed token from : delimited string -
i tried searching answer lost in questions. have shell script follows:
#!/bin/ksh if [ $# -eq 1 ]; exit -1 fi processinfo $1
at point, processinfo returns string of format: param1:param2:param3:param4:param5
i want capture param4 variable. ex: param4= processinfo $1 | sed regex
it seems simple sed , regex lost track of it. pls help
param4=$(processinfo $1 | awk -f: '{print $4}')
Comments
Post a Comment