This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

egrep -o implementation in tcl

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
sander_vk
Voice
Posts: 4
Joined: Fri Jul 06, 2007 7:34 am

egrep -o implementation in tcl

Post by sander_vk »

I'm writing a script to retrieve data from devices in a network. Now I want to put the data I retrieve into a SQL database for easy querying.

In order to do this I need to parse the retrieved data. Thereby I just want to retrieve the part that I am interested in.

I can do this using shell scripting and the following command:
egrep -o "[0-9]{1,2}:[0-9]{1,2}.[0-9]{1,2}:[0-9]{1,2}" < retrieved_data

But as my entire script will be running using a combination of TCL/EXPECT I am wondering how I can succeed using only that, thus not having to run seperate scripts from a shell script.

Anyone?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Use regexp
Post Reply