Sponsored Content
Top Forums Shell Programming and Scripting shell or perl script using grep and regex Post 302676511 by Corona688 on Tuesday 24th of July 2012 05:07:10 PM
Old 07-24-2012
regexes cannot understand ip/subnet ranges because they have no concept of numbers, let alone arithmetic.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

regex/shell script to Parse through XML Records

Hi All, I have been working on something that doesn't seem to have a clear regex solution and I just wanted to run it by everyone to see if I could get some insight into the method of solving this problem. I have a flat text file that contains billing records for users, however the records... (5 Replies)
Discussion started by: Jerrad
5 Replies

2. Shell Programming and Scripting

Checking the password thru Regex via Shell Script

All, I'm new to shell script. How do I check the password 1)password should have atleast one alpha character and one non-alpha character (0-9 Special) 2)password should not contain three or more repeated alpha numeric characters in a row Can somebody help me in creating the regular... (1 Reply)
Discussion started by: gudikal_karanam
1 Replies

3. UNIX for Dummies Questions & Answers

| help | unix | grep (GNU grep) 2.5.1 | advanced regex syntax

Hello, I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide. ls -aLl /bin | grep "\(x\)" Which works, just highlights 'x' where ever, when ever. I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies

4. Shell Programming and Scripting

Shell script regex help: accept only 3 file extensions

This regex is supposed to accept files with extensions 270, 276, and "txt" only. Everything else should be discarded. This is what I have. I'll spare you the rest of the code. ext =".\$" #ext =".\$" #ext =".\$" #ext =".\$" for xfile in `ls $dir | grep "$ext" | xargs`; do... (9 Replies)
Discussion started by: grep01
9 Replies

5. Shell Programming and Scripting

Converting perl regex to sed regex

I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly: if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies

6. Shell Programming and Scripting

Need regex shell script to remove text from file

Hello I am trying to remove a line like <?php /*versio:2.05*/if (!defined('determinator')){ content goes here}?> Now i want to scan all... (6 Replies)
Discussion started by: devp
6 Replies

7. Shell Programming and Scripting

netstat grep regex suspend script help

Hi I am trying to create a suspend script which will suspend the system only if it cant find port 9982 four or more times OR 192.168.0.:microsoft-ds ESTABLISHED in the output of netstat -t. I am struggling with the 9982 bit, googling etc I came up with if netstat -t|grep -P "(9982){4,}" ... (15 Replies)
Discussion started by: bilboNIX
15 Replies

8. Shell Programming and Scripting

Perl, RegEx - Help me to understand the regex!

I am not a big expert in regex and have just little understanding of that language. Could you help me to understand the regular Perl expression: ^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{ ------ This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies

9. UNIX for Beginners Questions & Answers

Help with understanding this regex in a Perl script parsing a 'complex' string

Hi, I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Discussion started by: newbie_01
3 Replies

10. UNIX for Beginners Questions & Answers

Generation of Regex for Perl script

I want to generate regex for this kind of expression and want to find and replace. like : ----> basically i want to find anything that match a pattern like this and remove the whole thing Please looking for some suggestions (1 Reply)
Discussion started by: utkarshkhanna44
1 Replies
ost::UDPBroadcast(3)					     Library Functions Manual					      ost::UDPBroadcast(3)

NAME
ost::UDPBroadcast - Representing a UDP socket used for subnet broadcasts, this class provides an alternate binding and setPeer() capability for UDP sockets. SYNOPSIS
#include <socket.h> Inherits ost::UDPSocket. Public Member Functions UDPBroadcast (const IPV4Address &ia, tpport_t port) Create and bind a subnet broadcast socket. void setPeer (const IPV4Broadcast &subnet, tpport_t port) Set peer by subnet rather than specific host. Additional Inherited Members Detailed Description Representing a UDP socket used for subnet broadcasts, this class provides an alternate binding and setPeer() capability for UDP sockets. Author: David Sugar dyfet@ostel.com Unreliable Datagram for subnet broadcasts. Constructor &; Destructor Documentation ost::UDPBroadcast::UDPBroadcast (const IPV4Address &ia, tpport_tport) Create and bind a subnet broadcast socket. Parameters: ia address to bind socket under locally. port to bind socket under locally. Member Function Documentation void ost::UDPBroadcast::setPeer (const IPV4Broadcast &subnet, tpport_tport) Set peer by subnet rather than specific host. Parameters: subnet of peer hosts to send to. port number to use. Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::UDPBroadcast(3)
All times are GMT -4. The time now is 04:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy