Hi all,
Can anyone tell me the bacics of how to 'chop' a line of data. Basicaly I have a line of text produced by a script, the output is from the ifconfig command and looks like this.
inet xx.xx.xx.xx --> 192.168.0.2 netmask 0xffffff00
I want to get rid of everything on the left and right of the ip address but i don't realy know where to start. I have seen other people use various commands to 'chop' strings but i have been unable to decode or understand the syntax.
I would be greatfull if anybody can give an example of chopping from the left and right of a string, with some syntax explanation.
Thanks,
JayBot! "Always know what you say, but don't always say what you know!"
Can anyone tell me the bacics of how to 'chop' a line of data. Basicaly I have a line of text produced by a script, the output is from the ifconfig command and looks like this.
inet xx.xx.xx.xx --> 192.168.0.2 netmask 0xffffff00
I want to get rid of everything on the left and right of the ip address but i don't realy know where to start. I have seen other people use various commands to 'chop' strings but i have been unable to decode or understand the syntax.
I would be greatfull if anybody can give an example of chopping from the left and right of a string, with some syntax explanation.
Thanks,
JayBot! "Always know what you say, but don't always say what you know!"