Sponsored Content
Full Discussion: simple sed question
Top Forums Shell Programming and Scripting simple sed question Post 302353896 by vgersh99 on Wednesday 16th of September 2009 12:30:19 PM
Old 09-16-2009
Code:
echo '(192.168.1.1)'   | sed 's/[()]//g'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple sed question

Is there an easier way to do the following: echo "|||||||" | sed 's/||/|0|/g; s/||/|0|/g' which would give the following |0|0|0|0|0|0| If it is not run twice it will not pick up the second occurance of the || and leave it empty as in echo "|||||||" | sed 's/||/|0|/g' which would give... (3 Replies)
Discussion started by: maverick
3 Replies

2. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

3. Shell Programming and Scripting

sed - simple question

Hello My file looks like that => 12.56 have then 7888778.2566 what 44454.54545 878787.66565 if else 4445.54545455 I want to change all '.' on ',' . I'm trying to do it with sed but I don't know chow to build regular expression to change 454.4466 on 454,4466 ? (13 Replies)
Discussion started by: scotty_123
13 Replies

4. Shell Programming and Scripting

simple sed question

hi is it possible to cut this two semicolon separated sed commands echo "string2 string3 string1" | sed s'/string1//g;s/string2//g' output: " string3 " to just one sed command without semicolon? thanks in advance funksen (10 Replies)
Discussion started by: funksen
10 Replies

5. Shell Programming and Scripting

simple awk/sed/tr question

I have a file CREATE TABLE DDD_EXT --- 1000 ( val u1 val u1 ); CREATE TABLE dsdasd_EXT --- 1323 ( val u1 val u1 ); CREATE TABLE AAAAAA_EXT --- 1222 ( val u1 val u1 ); CREATE TABLE E_EXT --- 11 ( val u1 val u1 (2 Replies)
Discussion started by: jville
2 Replies

6. Shell Programming and Scripting

Simple sed question.

I have a log output with a format similar to this: a=1, b= 2 c=0, d= 45, e=100 ... and so on. I figure I can just use awk or something to pipe the file to sed, but I'm trying to replace all the values above with 0. I've tried: cat blah | sed 's/=\(.*\),/0/'but that didn't work. ... (6 Replies)
Discussion started by: throw_a_stick
6 Replies

7. Shell Programming and Scripting

simple sed question - replace from phrase to end of line

I have the following line an in input file I want to digest with sed and simple replace the bold part with a variable defined in my bash script. I can do this in several sed operations but I know there must be a way to do it in a single sed line. What is the syntax? Line in file:... (1 Reply)
Discussion started by: graysky
1 Replies

8. Shell Programming and Scripting

Simple sed script question

Script newbie, so I'm sure I'm missing something obvious here, but how come this simple script does not work? #!/bin/bash ... (3 Replies)
Discussion started by: KidCactus
3 Replies

9. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies

10. UNIX for Beginners Questions & Answers

Simple SED Question

I don't understand this command behavior. echo "abc" |sed 's/a/&_&/' (4 Replies)
Discussion started by: Vartika18
4 Replies
IpfilterDlfConverter(3pm)				  LogReport's Lire Documentation				 IpfilterDlfConverter(3pm)

NAME
Lire::Firewall::IpfilterDlfConverter - convert ipf (ipmon) logs to firewall DLF DESCRIPTION
Lire::Firewall::IpfilterDlfConverter converts Ipfilter logs into firewall DLF format. Input for this converter is the standard ipf syslog log file as produced by ipmon. IP Filter is shipped with FreeBSD, OpenBSD (up to 2.9) and some other OS's. EXAMPLE
A ipfilter logfile which looks like Oct 30 07:42:29 rolle ipmon[16747]: 07:42:28.585962 ie0 @0:9 b 192.168.48.1,45085 -> 192.168.48.2,22 PR tcp len 20 64 -S OUT Oct 30 07:40:24 rolle ipmon[16747]: 07:40:23.631307 ep1 @0:6 b 192.168.26.5,113 -> 192.168.26.1,3717 PR tcp len 20 40 -AR OUT Oct 30 07:42:29 rolle ipmon[16747]: 07:42:28.585962 ie0 @0:9 b 192.168.48.1,45085 -> 192.168.48.2,22 PR tcp len 20 64 -S OUT Oct 30 07:44:11 rolle ipmon[16747]: 07:44:10.605416 2x ep1 @0:15 b 192.168.26.1,138 -> 192.168.26.255,138 PR udp len 20 257 IN Oct 30 07:44:34 rolle ipmon[16747]: 07:44:33.891869 ie0 @0:10 b 192.168.48.1,23406 -> 192.168.48.2,22 PR tcp len 20 64 -S OUT Oct 30 07:49:13 rolle ipmon[16747]: 07:49:12.554420 ep1 @0:15 b 210.132.100.117 -> 192.168.26.5 PR icmp len 20 56 icmp 3/3 for 192.168.26.5,61915 - 210.132.100.117,53 PR udp len 20 23040 IN Oct 30 07:50:23 rolle ipmon[16747]: 07:50:22.908107 ep1 @0:15 b 210.132.100.117 -> 192.168.26.5 PR icmp len 20 56 icmp 3/3 for 192.168.26.5,4480 - 210.132.100.117,53 PR udp len 20 19712 IN Oct 30 07:56:11 rolle ipmon[16747]: 07:56:11.113029 2x ep1 @0:15 b 192.168.26.1,138 -> 192.168.26.255,138 PR udp len 20 257 IN (that's: .... 'PR' protocol 'len' length_of_ip_headers_saved packetlength direction) will get converted to something like 994398737 denied igmp 100.187.115.1 - ep1 LIRE_NOTAVAIL 224.0.0.2 - 56 994398861 denied igmp 100.187.115.1 - ep1 LIRE_NOTAVAIL 224.0.0.1 - 56 994398862 denied igmp 100.187.115.1 - ep1 LIRE_NOTAVAIL 224.0.0.2 - 56 994406849 denied udp 192.168.26.4 137 ie0 LIRE_NOTAVAIL 192.168.26.255 137 116 994406850 denied udp 192.168.26.4 137 ie0 LIRE_NOTAVAIL 192.168.26.255 137 116 994406866 denied udp 192.168.26.4 137 ie0 LIRE_NOTAVAIL 192.168.26.255 137 98 SEE ALSO
ipl(4) for description of log structure. The ipmon.c source (e.g. on http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/ src/usr.sbin/ipmon/Attic/ipmon.c?rev=1.27& content-type=text/plain&hideattic=0 ) for the specification of the log syntax. The IP Filter webpage on http://coombs.anu.edu.au/~avalon/ip-filter.html AUTHOR
Joost van Baal <joostvb@logreport.org>, Wessel Dankers <wsl@logreport.org> VERSION
$Id: IpfilterDlfConverter.pm,v 1.7 2009/03/15 08:10:55 vanbaal Exp $ COPYRIGHT
Copyright (C) 2001-2003 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2009-03-15 IpfilterDlfConverter(3pm)
All times are GMT -4. The time now is 09:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy