Sponsored Content
Top Forums Shell Programming and Scripting regular expressions using perl script Post 302272602 by otheus on Wednesday 31st of December 2008 05:35:41 AM
Old 12-31-2008
Forgive me, but this smells like homework and is against the rules.

Also, just spell "input"... too many things stand for "i/p", such as "Internet Protocol". Leave a message for me if this is not the case, and I'll re-open the thread.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl regular expressions...

I am writing script that will act like the 'comm' utility. My problem is when trying to read whether the user has entered -123 or -1 or -1...etc. I currently have: if(m/??/g){ print "Good.\n"; } So, this should check for all... (1 Reply)
Discussion started by: DrRo183
1 Replies

2. UNIX for Dummies Questions & Answers

Regular Expressions HELP - PERL

Hello, $line=USING (FILE '/TEST1/FILENAME'5000) I want to reterive the value between ' and ) which is 5000 here. i have tried out the following expressions ... Type 1 : $Var1=`sed -e 's/.*\' //' -e 's\).*$/' $line`; Type 2 : $Var1=`echo $line | awk -F"\'" '{print $2}' | awk -F"\\)"... (1 Reply)
Discussion started by: maxmave
1 Replies

3. Shell Programming and Scripting

Regular Expressions HELP - PERL

Hello, $line=USING (FILE '/TEST1/FILENAME'5000) I want to reterive the value between ' and ) which is 5000 here. i have tried out the following expressions ... Type 1 : $Var1=`sed -e 's/.*\' //' -e 's\).*$/' $line`; Type 2 : $Var1=`echo $line | awk -F"\'" '{print $2}' | awk -F"\\)"... (3 Replies)
Discussion started by: maxmave
3 Replies

4. Shell Programming and Scripting

perl regular expressions and field search

Hello guys/gals, i am sorry as this is probably very simply but i am slowly learning perl and need to convert some old korn shell scripts. I need to be able to search a file line by line but only match a string at particular location on that line, for example character 20-30. So my file... (4 Replies)
Discussion started by: dynamox
4 Replies

5. Shell Programming and Scripting

Regular expressions - Perl

Hello everybody, I am trying to connect from hp-ux to win 2003 using perl's Net::Telnet module. Seeing the examples in couple of web sites, I saw I have to declare a Prompt => Can somebody please tell me what my regular expression should be? The prompt after I log in is: ... login:... (1 Reply)
Discussion started by: whatever
1 Replies

6. Programming

Which language is best suited for regular expressions perl,python.ruby ?

Hello all, i am in a bit of dilema here. i dont know any thing about perl or python. only know a little bit of awk. now unable to take a decission as to which language to go for. my requirement is building a testing framework.suite which will execute ssytem comands remotely on unix... (2 Replies)
Discussion started by: achak01
2 Replies

7. Shell Programming and Scripting

Regular Expressions in K Shell Script

I need to write a K shell script to find full file names , line numbers and lines which have words meeting either of following 2 criterias - 1)words which are 6 to 8 character long and alphanumeric. 2)Minimum 8 characters, one upper case, one lower case letter, one of the special characters... (1 Reply)
Discussion started by: Rajpreet1985
1 Replies

8. Shell Programming and Scripting

Perl - Regular Expressions - Match complete word only

Hi Team, I have two strings like: xxx|yyy|Arizona Cardinals| Tell Cardinals | Cardinals bbb|Bell Earn, Jr | Bell Earn | Jayhawks | hawks I have a lookup file which has a set of strings. These need to be removed from above two strings Lookup file Contents: Bell Earn, Jr hawks... (2 Replies)
Discussion started by: forums123456
2 Replies

9. Shell Programming and Scripting

PERL Regular Expressions

im trying to extract some tags between and in a file..for eg..the file format is I want the and extracted from the file i.e the tags which is present b/w and I have the regex for extracting the tags from the whole file but how to specify my search within the and... (1 Reply)
Discussion started by: rajkrishna89
1 Replies

10. Shell Programming and Scripting

Regular expressions in tcsh script

Hi, I have a shell script in tcsh to which I pass an argument, the length of which can vary. The possible values of the argument are the letters -c,s,i,q,a. and also a combination of these letters. (e.g: cs,si,ca,iq,qa,csq,acs,csia ..etc). The order of the letters does not matter. My problem... (2 Replies)
Discussion started by: Vaisakh P
2 Replies
icmp(4p)																  icmp(4p)

Name
       icmp - Internet Control Message Protocol

Syntax
       #include <sys/socket.h>
       #include <netinet/in.h>

       s = socket(AF_INET, SOCK_RAW, proto);

Description
       The ICMP is the error and control message protocol used by the Internet Protocol (IP) transport layer and the Internet protocol family.	It
       can be accessed through a ``raw socket'' for network monitoring and diagnostic functions.  The proto argument to the socket call to  create
       an  ICMP  socket is obtained from the routine.  ICMP sockets are connectionless, and are normally used with the and system calls.  The call
       can also be used to fix the destination for future packets (in which case the or and or system calls can then be used).

       Outgoing packets automatically have an IP header prepended to them (based on the destination address).  Incoming packets are received  with
       the IP header and options intact.

Diagnostics
       On failure, a socket operation returns any of the following errors:

       [EISCONN]      Tried  to  establish a connection on a socket that already has one, or tried to send a datagram with the destination address
		      specified and the socket was already connected.

       [ENOTCONN]     Tried to send a datagram, but no destination address was specified, and the socket has not connected.

       [ENOBUFS]      The system ran out of memory for an internal data structure.

       [EADDRNOTAVAIL]
		      An attempt was made to create a socket with a network address for which no network interface exists.

See Also
       inet(4f), intro(4n), ip(4p)

																	  icmp(4p)
All times are GMT -4. The time now is 11:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy