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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux