I would imagine something like:
"if a line containing ":" is followed by an empty line delete both lines (the line with ":" and the empty line)"
i.e. something like in general
if a line containing regex1 is followed (immediately after) by a line containing regex2 delete both lines.
if it would be on one line I would do: sed '/regex1.*regex2/d' -->
how to spread this command on 2 lines? And consider hat in my case regex2 is an empty line ( i.e. ^$).
I have a file which has the first blank line:
sundev22$cat /t1/bin/startallocs
/t1/bin/startallocsys 123
sundev22$
Is there a command to remove this first blank line? Thanks for help -A (4 Replies)
I'm new to using sed and grep commands, but have found them extremely useful. However I am having a hard time figuring this one out:
Delete every line containing the word CEN and the next line as well.
ie. test.txt
blue
324 CEN
green
red
blue
324 CEN
green
red
blue
to produce:... (2 Replies)
I've got a report I need to make easier to read Using sh on HP-UX 11.12.
In short, I want to search for a regular expression and when found, examine the next line to see if it's blank. If so, then delete both lines. If not blank, move on to the next regexp. Repeat.
So far I've got:
... (7 Replies)
All,
I have a file which contains two entry with spaces (either one or more than one space). ex.
/tmp/scripts/sql CUST_YR_END_INI.sql
/tmp/scripts/sql CUST_WK_END_INI.sql
/tmp/scripts/sql CUST_MTH_END_INI.sql
/tmp/scripts/sql CUST_YR_END_INC.sql
now I want to... (11 Replies)
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hello.
I have a config file (/etc/my_config_file) which may content :
#
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
network_interface=eth0
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Hi guys I am trying to figure out how to match a pattern with a regex up to a full blank line. I will show you what I mean with this example:
example A
movie name: ted
movie name: TMNT
movie name: Jinxed
example B
movie names:
Gravity
Faster
Turbo
song titles:
dont
hello
problem (8 Replies)
Hi,
Test file x.txt below. This file is generated by a program that I unfortunately do not have control on how it gets presented/generated.
create PACKAGE "XXX_INTERFACE_DEFECT_RPT_TEST" is
TYPE refCursor IS REF CURSOR;
Function queryRecords (
p_status varchar2,
...
...
...
)... (4 Replies)
Discussion started by: newbie_01
4 Replies
LEARN ABOUT DEBIAN
mac-vendor
MAC-VENDOR(5) File Formats Manual MAC-VENDOR(5)NAME
mac-vendor - Ethernet vendor file for arp-scan
SYNOPSIS
mac-vendor.txt
DESCRIPTION
The mac-vendor.txt contains Ethernet MAC to vendor string mappings for arp-scan. It is used in addition to the IEEE OUI and IAB listings
in ieee-oui.txt and ieee-iab.txt. It is for MAC-vendor mappings that are not covered by the IEEE manufacturer listings.
Each line in the mac-vendor.txt file contains a MAC-vendor mapping in the form:
<MAC-Prefix><TAB><Vendor>
Where <MAC-Prefix> is the prefix of the MAC address in hex, and <Vendor> is the name of the vendor. The prefix can be of any length from
two hex digits (one octet) to twelve hex digits (six octets, the entire Ethernet hardware address). The alphabetic hex characters [A-F]
must be entered in upper case.
For example:
012345 would match 01:23:45:xx:xx:xx, where xx represents any value;
0123456 would match 01:23:45:6x:xx:xx; and
01234567 would match 01:23:45:67:xx:xx.
Blank lines and lines beginning with "#" are ignored.
The order of entries in the file is not important. arp-scan will attempt to match larger prefixes before trying to match smaller ones, and
will stop at the first match.
FILES
/usr/local/share/arp-scan/mac-vendor.txt
EXAMPLE
# From nmap Debian bug report #369681 dated 31 May 2006
525400 QEMU
B0C420 Bochs
# From RFC 2338: 00-00-5E-00-01-{VRID}
00005E0001 VRRP (last octet is VRID)
# Microsoft WLBS (Windows NT Load Balancing Service)
# http://www.microsoft.com/technet/prodtechnol/acs/reskit/acrkappb.mspx
02BF Microsoft WLBS (last four octets are IP address)
AUTHOR
Roy Hills <Roy.Hills@nta-monitor.com>
SEE ALSO arp-scan(1)get-oui(1)get-iab(1)arp-fingerprint(1)
http://www.nta-monitor.com/wiki/ The arp-scan wiki page.
March 30, 2007 MAC-VENDOR(5)