Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support TCL scripting - searching for a IP address in a string Post 302359288 by Mr. Zer0 on Tuesday 6th of October 2009 07:27:57 AM
Old 10-06-2009
TCL scripting - searching for a IP address in a string

Hi All,

Can anyone please help me with the regular expression/code snippet to search for an IP address in a string with Tcl scripting.

Example string
"OSPF_NBRUP OSPF neighbor 16.138.181.15 (realm ospf-v2 e1-0/0/0:37.0 area 0.0.0.0) state changed from Full to Down due to KillNbr"

In the above string i want to find IP 16.138.181.15



 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting a string from one file and searching the same string in other files

Hi, Need to extract a string from one file and search the same in other files. Ex: I have file1 of hundred lines with no delimiters not even space. I have 3 more files. I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
Discussion started by: mohancrr
1 Replies

2. Shell Programming and Scripting

String manipulation in TCL

Suppose pwd=/home/user/work/wip1 How to output the "pwd string" into 5 chunks? /home/user/work/wip1 /home/user/work /home/user /home / :confused: (1 Reply)
Discussion started by: jehrome_rando
1 Replies

3. Shell Programming and Scripting

getting a string from user while executing a tcl script

Hi All, I am executing a Tcl script and i am trying to get the user input while they execute the script at start itself like >>filename.tcl USERINPUT and then i will take this userinput inside the the tcl assign it to some variable for further manipulation/processing ...... can anyone pls... (1 Reply)
Discussion started by: sukrish
1 Replies

4. Shell Programming and Scripting

Howto set string variable in TCL?

Anyone knows how to set variable in TCL ? let say i have a password variable and it will have different values. set variable and variable has different values like: xxxx yyyy zzzz (0 Replies)
Discussion started by: linuxgeek
0 Replies

5. Shell Programming and Scripting

searching the required string and appending string to it.

Hi all, I have some data in the form of adc|nvhs|nahssn|njadnk|nkfds in the above data i need to write a script so thet it will append "|||" to the third occurnace in the string ..... the outout should look like adc|nvhs|nahssn||||njadnk|nkfds Thanks, Firestar. (6 Replies)
Discussion started by: firestar
6 Replies

6. Shell Programming and Scripting

TCL expect out string with multiple lines

Hello, I will be sending this command to a specific COMID: exp_send-i $COMID "fdisk -l | grep Disk | awk '{print $2}'" The command will produce this output: /dev/sda /dev/sdb etc.. the problem is how do I store the output in a variable in TCL, I am currently using this to grab the... (1 Reply)
Discussion started by: h0ujun
1 Replies

7. Shell Programming and Scripting

Need help with TCL code to find IP address from a URL

Need help with a a tcl code. Need to find out the ip address from a URL if it is present to do some activity. The URLs will be of the form <domain>?a=12345&d=somestring1(Note: c not present) <domain>?c=10.10.10.100&d=somestring1 <domain>?a=12345&b=somestring1&c=10.1.2.4&d=somestring2... (1 Reply)
Discussion started by: ampak
1 Replies

8. Shell Programming and Scripting

TCL scripting: errorInfo=integer value too large to represent

The username is of the format : 123456789110000-1234@something.com With this below TCL procedure, I am trying add first and Sec Id and get third Id. I checked in online compiler and it seems to work and add. However, when I am running this in my lab, I get error as "integer value too large to... (1 Reply)
Discussion started by: Shaibal_bp
1 Replies

9. Shell Programming and Scripting

TCL scripting: errorInfo=integer value too large to represent

The username is of the format : 123456789110000-1234@something.com With this below TCL procedure, I am trying add first and Sec Id and get third Id. I checked in online compiler and it seems to work and add. However, when I am running this in my lab, I get error as "integer value too large to... (3 Replies)
Discussion started by: Shaibal_bp
3 Replies

10. Shell Programming and Scripting

Difficulty searching for IP address in a file

Hi, Below is the command I use to search for IP address in a file. find ./ -type f \( -name "*.txt" -or -name "*.xml" \) | xargs grep -oE "\b({1,3}\.){3}{1,3}\b"As an output I found three IP address and below is how they look. #Listen 112.34.56.58:80 Listen 112.134.56.58:80 #This is an... (7 Replies)
Discussion started by: mohtashims
7 Replies
OSPFD(8)							   Version 0.88 							  OSPFD(8)

NAME
ospfd - an OSPF v2 routing engine for use with Zebra SYNOPSIS
ospfd [ -dhlv ] [ -f config-file ] [ -i pid-file ] [ -P port-number ] DESCRIPTION
ospfd is a routing component that works with the zebra routing engine. OPTIONS
-d, --daemon Runs in daemon mode, forking and exiting from tty. -f, --config-file config-file Specifies the config file to use for startup. If not specified this option will likely default to /usr/local/etc/ospfd.conf. -h, --help A brief message. -i, --pid_file pid-file When ospfd starts its process idenifier is written to pid-file. The init system uses the recorded PID to stop or restart ospfd. The likely default is /var/run/ospfd.pid. -l, --log_mode Turn verbose logging on. -P, --vty_port port-number Specify the port that the ospfd VTY will listen on. This defaults to 2604, as specified in /etc/services. -v, --version Print the version and exit. COMMANDS
router ospf router zebra -- (Move routes into kernel table) network [NETWORK] area [OSPF-AREA-ID] no network [NETWORK] show ip ospf interface show ip ospf neighbor show ip ospf database show ip ospf route debug ospf ism debug ospf packet debug ospf nsm FILES
/usr/local/sbin/ospfd The default location of the ospfd binary. /usr/local/etc/ospfd.conf The default location of the ospfd config file. $(PWD)/ospfd.log If the ospfd process is config'd to output logs to a file, then you will find this file in the directory where you started ospfd. WARNING
This man page is intended as a quick reference for command line options, and for config file commands. The definitive document is the Info file zebra. DIAGNOSTICS
The ospfd process may log to standard output, to a VTY, to a log file, or through syslog to the system logs. ospfd supports many debugging options, see the Info file, or the source for details. SEE ALSO
References to other related man pages: ripd(8), ripngd(8), ospf6d(8), bgpd(8), zebra(8), vtysh(1) BUGS
ospfd eats bugs for breakfast. If you have food for the maintainers try <bug-zebra@gnu.org> AUTHOR
[S] See <www.zebra.org>, or the Info file for an accurate list of authors. Zebra Beast - OSPFD July 2000 OSPFD(8)
All times are GMT -4. The time now is 09:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy