Hi ,suppose I have a file
title=dsafsadf
........
.......
year=1995
author=john smith
............
title=bbbbbb
........
.......
year=1988
author=alex
I need to replace the title line with a expression that contains variables year and author. I want to use a python readline for loop.... (10 Replies)
Hi all,
I appreciate the enormous amount of knowledge that flows in this forum.
I am an average UNIX user. I have many files with lines like the below. I have separated each line with space for ease of reading. I need to replace the first occurance of "/00" with null on those lines that have... (6 Replies)
Hi,
how can i print the previous, current and next line using sed?
current line is the matching line.
The following prints all lines containing 'Failure' and also the immediate next line
cat $file | sed -n -e '/Failure/{N;p;}'
Now, i also want to print the previous line too.
Thanks,... (8 Replies)
Hello,
Can anybody help me to correct my sed syntax to find the string and print previous two lines and current line and next one line.
i am using string as "testing"
netstat -v | sed -n -e '/test/{x;2!p;g;$!N;p;D;}' -e h
i am able to get the previous line current line next line but... (1 Reply)
Hi,
I have a written a shell script to get the previous line based on the pattern.
For example if a file has below lines:
----------------------------------------------
#UNBLOCK_As _per
#As per
205.162.42.92
#BLOCK_As_per
#-----------------------
#input checks
abc.com... (5 Replies)
Hi guys,
I have found your forum super useful. However, right now I am stuck on a seemingly "simple" thing in AWK. I have two columns of data, the first column in Age (in million years) and the second column is Convergence Rate (in mm/yr).
I am trying to process my data so I can use it to... (2 Replies)
I am trying to delete lines in archived Apache httpd logs
Each line has the pattern:
<ip-address> - - <date-time> <document-request-URL> <http-response> <size-of-req'd-doc> <referring-document-URL>
This pattern is shown in the example of 6 lines from the log in the code box below. These 6... (1 Reply)
For example, I have a file called number.txt.
x y
1 1
2 4
3 9
4 6
5 5
6 6
7 9
8 4
9 1
10 0
...
And I want to print out the value of x and y, if y%4==0 and the next value of y%4==0. Thus, the sample output is:
1 1 *because the previous x before 2 is 1
2 4 *because 4%4 == 0
7 9... (2 Replies)
Hi Everyone,
I have a file as below:
IM2345638,sherfvf,usha,30
IM384940374,deiufbd,usha,30
IM323763822,cdejdkdnbds,theju,15
0,dhejdncbfd,us,20
IM398202038,dhekjdkdld,tj,30
0,foifsjd,u2,40
The output i need is as below
IM2345638,sherfvf,usha,30... (4 Replies)
How could be removed \n only if appearing at position 80 in the line? (4 Replies)
Discussion started by: RomanF
4 Replies
LEARN ABOUT DEBIAN
cutter
CUTTER(8) System Manager's Manual CUTTER(8)NAME
cutter - cut tcp/ip connections
SYNOPSIS
cutter ipaddress1 [ port1 [ ipaddress2 [ port2 ] ] ]
DESCRIPTION
Cutter is an open source program that allows Linux firewall administrators to abort TCP/IP connections routed over the firewall or router
on which it is run.
WARNING
Cutter has been designed for use as a administrators tool for Linux firewalls. It's use (as is, or modified) for any other purpose is not
sanctioned by the author. So - do not use this tool as a parachute, or to dry your cat, chill meat, answer your phone, drive you car, teach
your kids to read or attack other people's computer systems or networks.
This software has been designed for legal and appropriate use by network security administrators and the like. It has been written as part
of a larger Linux firewall project, targetting at controlling traffic from peer-to-peer software such as Kazaa, iMesh and others into and
out of a private network. It is not designed as a tool for malicious use and the author in no way sanctions such use.
Users of the software should be aware that it's actions are easily detectable using a number of readily available network monitoring tools,
and it makes no attempt to disguise it's actions. Malicious use of "cutter" could result in a jail sentance in a number of countries around
the world.
The author is not responsible for the results of using this software. It is provided "as is" in the hope that it will be useful, but no
garantees are made about it's use.
USAGE
Cutter can be called using one of the following four syntaxes.
cutter ip-address
Example:
cutter 10.10.0.45
Cuts all connections passing through the firewall between any ports on the specified ip-address (either a "private" or "public"
address) and any other hosts. This can be used to close down all incoming connections to a particular server, all outgoing connec-
tions from a particular client or all outgoing connections to a server.
cutter ip-address port
Example:
cutter 200.1.2.3 80
Cuts all connections to or from the specified ip-address/port pair. This allows the user to be a little more specific than the pre-
vious example and allows targetting of specific services on specific hosts.
cutter ip-address-1 port-1 ip-address-2
Example:
cutter 200.1.2.3 22 10.10.0.45
Cuts all connections between ip-address-2 and ip-address-1/port-1. This allows the user to cut connections between a specified
"client" and a particular service on a specified host. Our example closes host 10.10.0.45's SSH connection to server 200.1.2.3.
cutter ip-address-1 port-1 ip-address-2 port-2
Example:
cutter 200.1.2.3 22 10.10.0.45 32451
Cuts the specific connection between the two ip/port number pairs given.
STATUS
Cutter 1.03 should be considered EXPERIMENTAL. The author is releasing a tool that works on the systems he has access to (namely: IPCop
and RedHat Linux), and he is seeking input on it's use on other systems, ideas for improvement, offers of sponsorship - etc.
ADDITIONAL DOCUMENTATION
This program is documented at http://www.lowth.com/cutter/ <http://www.lowth.com/cutter/>
AUTHOR
Blars Blarson addapted the README and web page written by Chris Lowth into this man page for debian package of cutter. This man page may
be distribuated under the terms of the Gnu GPL version 2.
April, 2005 CUTTER(8)