Hi,
I have a file with many lines in it. One of them look like :
set auto_upgrade {1 2 3 4}
The list can contain more numbers.
Now, in a shell script I want to look into this file and find out what is the last number in the list. In the example above, it should find 4. I have a regular expression to find this :
set auto_upgrade {\([0-9] \)*\([0-9]\{1,\}\)}
The second group contains what I need. However, how do I use this regular expression ? I tried sed but it returns the full file with a substition. I just want the second group.
Thanks in advance, Barth