I have a file like this:
and I want this:
Basically, I need to replace all lines that start with a letter or string, except the "-" (i.e. negative number must remain like that).
I tried:
but doesn't replace the " or ( or other symbols, how could I replace symbols in general? is there a way or should I specify all the symbols?
Hello, can any one help me on this?
I have a /etc/exports file, it may contain a line (I can not remember exactly). Let me use an a sample file myfile.txt which contains a line
* mypattern uncertain key words
I want this line (with any possible combination of the uncertain key words to be... (2 Replies)
Hello Experts,
I am working on a small file editing script. Since all experts here are very generous to give me the complete code, I would take up the problem in steps so that I ensure my opportunity to learn.
AIM: The script has some commented and some uncommented lines. I need to :
... (2 Replies)
hlow all i need help
how can i replace blank number with awk
input.txt
300::|355264313178490
301::|358814003239510
302::|358316038113400
303::|357954002633660
304::|354072040694090
305::|356956015214190
306::|352943020525180
307::|359574033836610
308::|381810990023580
so will be like... (4 Replies)
Hi,
I have a set of files in a directory that I have to read and replace the first occurrence of a number with another dummy number. This is what I have so far but it does not seem to work. The files have lot of other data in each row and each data element is separated by ,@,
for file in... (13 Replies)
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
I am working on a script to convert bank data to a csv file. I have the format done - columns etc. The final piece of the puzzle is to change the second field (after the R) of every line to reflect its' line number in the file. I am stumped. I can use awk on each line but need help looping through... (9 Replies)
Hi,
My requirement is, to find the word "data" and replace the starting of each line with # using sed.
/dev/datavg/xxx /xxx ext3 defaults 1 2
/dev/datavg/yyy /yyy ext3 defaults 1 2
result to be
#/dev/datavg/xxx /xxx ... (1 Reply)
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
I am new to ksh scripts. I would like to be able to read a file line by line from a certain line number. I have a specific line number saved in a variable, say $lineNumber. How can I start reading the file from the line number saved in $lineNumber? Thanks! (4 Replies)
Discussion started by: dcowboys13
4 Replies
LEARN ABOUT DEBIAN
dhcpdump
DHCPDUMP(8) User Contributed Software DHCPDUMP(8)NAME
dhcpdump - DHCP packet dumper
SYNOPSIS
dhcpdump [-h regular-expression] -i interface
DESCRIPTION
This command parses the output of tcpdump to display the dhcp-packets for easier checking and debugging.
USAGE
dhcpdump -i /dev/fxp0
If you want to filter a specific Client Hardware Address (CHADDR), then you can specifiy it as a regular expressions:
dhcpdump -i /dev/fxp0 -h ^00:c0:4f
This will display only the packets with Client Hardware Addresses which start with 00:c0:4f.
OUTPUT
TIME: 15:45:02.084272
IP: 0.0.0.0.68 (0:c0:4f:82:ac:7f) > 255.255.255.255.67 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 28f61b03
SECS: 0
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:c0:4f:82:ac:7f:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 3 (DHCPREQUEST)
OPTION: 54 ( 4) Server identifier 130.139.64.101
OPTION: 50 ( 4) Request IP address 130.139.64.143
OPTION: 55 ( 7) Parameter Request List 1 (Subnet mask)
3 (Routers)
58 (T1)
59 (T2)
At the option field, the first field is the value of the option, the second one (between brackets) is the length of the option-datafield,
the third field is the name of the option, the fourth field is the data of the option.
RETURN VALUES
Always 0.
NOTES
Privileged access is often needed for accessing the interface.
BUGS
Not all the parameter options are printed verbose, because of lack of documentation. Not all the options are tested, because of lack of
clients/servers with these options. If you have a dump of one of them, please send them to me and I'll incorperate them.
THANKS TO
Ralph Droms and Ted Lemons "The DHCP Handbook", ISBN 1-57870-137-6.
Peter Apian-Bennewitz <apian@ise.fhg.de> for his Client Hardware Address filtering
AUTHOR
Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org)
SEE ALSO dhcpd(8), tcpdump(1), RFC2132
perl v5.10.0 23 June 2008 DHCPDUMP(8)