Hey Guys,
First off you guys are such a great help with scripting and I greatly appreciate it.
Ok so here is what I am trying to do. I am in the process of writing a script. But I need to set one of the variables equal to a substring from another script. So here is what I need.
In my script I have a variable
ADMINPORT=
The = will be the result of cat otherscript | grep ADMIN_PORT
What I need though is not the admin port but the actual port that comes after that.
So if I run the command right now it will return the whole ADMIN_PORT=8011 but I just want the 8011.
Thanks for you help with this in advance.
First off you guys are such a great help with scripting and I greatly appreciate it.
Ok so here is what I am trying to do. I am in the process of writing a script. But I need to set one of the variables equal to a substring from another script. So here is what I need.
In my script I have a variable
ADMINPORT=
The = will be the result of cat otherscript | grep ADMIN_PORT
What I need though is not the admin port but the actual port that comes after that.
So if I run the command right now it will return the whole ADMIN_PORT=8011 but I just want the 8011.
Thanks for you help with this in advance.
Comment