Hi,
i have two questions, I am new to programming
- I have an output of a command and i want to get some specific part of it in a variable. i am trying
sr=`some comand xyz| grep 'Last Changed Rev:' | cut -c19-`
now variable sr gets a end of line character at end.
output of the command is
Date: yyyy-mm-dd
---------
abc
xyz
Last Changed Rev: 10
abc
i want to get this 10 in the variable sr. i dont know the number length in advance.
- Also the comand returns multiple lines output, how to get complete text in between
abc
xyz
Last Changed Rev: 10
abc
in another variable?
please help!
Thanks in advance..