Little formatting help needed.
I have a following string.
"machine=IFLMUD5HP0581&group1=Stop" I have created 2 variables namely machine and action. machine should contain IFLMUD5HP0581 action should contain Stop How do i write a script for the same. |
Code:
var="machine=IFLMUD5HP0581&group1=Stop" |
Thought about this a little more and if there is a chance you could alter group1 to be action
or did not mind using group1 instead of action, you could also use this: Code:
var="machine=IFLMUD5HP0581&group1=Stop" |
Here's a method, demonstrated at the command prompt
Code:
c@CW8:~$ x="machine=IFLMUD5HP0581&group1=Stop" |
@catkin - I like it! :)
btw. on testing I found you could do: eval ${array[@]} |
Quote:
|
Thank you very much my problem is solved.
|
pinga123 ... nice to see you have a solution, do not forget to mark as SOLVED using the Thread Tools
|
All times are GMT -5. The time now is 01:25 AM. |