Find a value following a string
I have a requirement that I need to get the value of a variable stored in a file..the content will be as follows..
proc="Agent",clause="-l 444441 -p 222221 -i 191.161.1.71 -t 60 -s 1",rstcnt="3",t="60",-s="0",critical="no",prty="20"; the position of the variables is not fixed..For example -p can come anywhere in the line..If I give -p then it should return me 222221. If I give -i 191.161.1.71 , if I give critical then it should return "no" ie for any string given it should get the next value. Is it possible to do it in shell script???..Pls give ur inputs.. |
hi there,
yep, it is possible to use shell script. what should be the output of "-s"? it appears twice.... my tip is *disclaimer : not tested. from the top of my head.. Code:
#!/bin/sh Code:
myscript.sh $whatever.. regards slackie1000 |
All times are GMT -5. The time now is 06:38 PM. |