I am trying to write a script for Linux on tcsh. I have not written a script since maybe 98 on Unix and that was very basic stuff.
I am trying to take a string and find sub strings in it. For example in a very long string that is a devices status I'd like to find a sub sting "the status: " and if said sub string is found read the next word(string) following that sub string.
Basically I have a variable called INFO that is populated after sending out a command and I want to search it. I can of course loop through the whole thing but I know there are shorter ways of doing so, I just can't remember how anymore.
Plus if anyone knows of a decent source for script writing info that would be of use to me.
Hope this makes sense. PS If it were my choice I'd write this in straight up code and be done yesterday, but not my decision.
Thanks.