Parsing output into a usable format.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

Can someone please lend me a hand to parse the following text into a
usable format.

I am grepping a web page for a numeric figure that appears only on one
line using the following
         #lynx  -source http://172.19.100.127/eng/main.htm|grep  sVal\\[7\\]
This produces the following output
         #sVal[7] = "2016";
I want to be able to extract only the numeric figure so it can be used
in a expr sum.
the figure can be anywhere from 0 to several million.
I am using the following but need the last 2 characters to allways be removed.
        # lynx  -source http://172.19.100.127/eng/main.htm|grep
sVal\\[7\\] | cut -c 12-20
        # 2016";
What is the best way? I tried using a delimeter of " but can not seem
to get it to work #
        #lynx  -source http://172.19.100.127/eng/main.htm|grep
sVal\\[7\\]|cut -d, -f"

Thanks

Paul


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux