I have file as shown below. Would like to split the file based on the context of data.
Like, split the content between "---- XXX Info ----" and "
---- YYY Info ----" to a file.
When I try using below command, 2nd file contains all the info starting after first "---- YYYY Info ----" instance.
Any suggestions how to split the only reqd. data as mentioned above. ---------- Post updated at 03:28 PM ---------- Previous update was at 03:26 PM ----------
For clarification:
I need output files like:
file 1:
file 2:
file 3:
Last edited by Scott; 12-02-2010 at 07:10 PM..
Reason: Use code tags...
I have a file given below. I want to split the file where ever I came across
***(instead you can put ### symbols in the file) . Also I need to name the file by extracting the report name from the first line which is in bold(eg:RPT507A) concatinated with DD(day on which the file runs). Can someone... (1 Reply)
I need to split a file based on certain context inside the file. Is there a unix command that can do this? I have looked into split and csplit but it does not seem like those would work because I need to split this file based on certain text. The file has multiple records and I need to split this... (1 Reply)
Hi,
I'm, new to shell scripting, I have a requirement where I have to split an incoming file into separate files each containing a maximum of 3 million rows.
For e.g: if my incoming file say In.txt has 8 mn rows then I need to create 3 files, in which two will 3 mn rows and one will contain 2... (2 Replies)
Hello
I have a requirement where i need to split the Input fixed width file which contains multiple invoices into multiple files with 2 invoices per file.
Each invoice can be identified by its first line's second character which is "H" and sixth character is " " space and the invoice would... (10 Replies)
I have an input file of this format
<Date><other data>
For example,
20081213aaaaaaaaa
20081213bbbbbbbbb
20081220ccccccccc
20081220ddddddddd
20081220eeeeeeeee
20081227ffffffffffffff
The first 8 chars are date in YYYYMMDD formT. I need to split this file into n files where n is the... (9 Replies)
Hi all,
I have a file (say file.txt) which contains comma-separated rows. Each row has seven columns. Only column 4 or 5 (not both) can have empty values like "" in each line.
Sample lines
So, now i want all the rows that have column 4 as "" go in file1.txt and all the rows that have column... (8 Replies)
Hello friends,
Is there any way to split file from n to n+6 into 1 file and (n+7) to (n+16) into other file etc.
f.e I have source pipe delimated file with 20 lines and i need to split 1-6 in file1 and 7-16 in file2 and 17-20 in file 3
I need to split into fixed number of file like 4 files... (2 Replies)
I have a file as below
pema.txt
s2dhshfu dshfkdjh dshfd
rjhfjhflhflhvflxhvlxhvx vlvhx
sfjhldhfdjhldjhjhjdhjhjxhjhxjxh
sjfdhdhfldhlghldhflhflhfhldfhlsh
rjsdjh#error occured#
skjfhhfdkhfkdhbvfkdhvkjhfvkhf
sjkdfhdjfh#error occured#
my requirement is to create 3 files frm the... (8 Replies)
Hi All,
I am having a problem. I tried to extract the chunk of data and tried to fix I am not able to. Any help please
Basically I need to remove the for , values after K,
this is how it is now
A,,
B,
C,C,
D,D,
12/04/10,12/04/10,
K,1,1,1,1,0,3.0,
K,1,1,1,2,0,4.0,... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
LEARN ABOUT DEBIAN
snmp::info::layer3::pf
Info::Layer3::Pf(3pm) User Contributed Perl Documentation Info::Layer3::Pf(3pm)NAME
SNMP::Info::Layer3::Pf - SNMP Interface to FreeBSD-Based Firewalls using Pf /Pf Sense
AUTHOR
Max Baker
SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $pf = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
# These arguments are passed directly to SNMP::Session
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.
";
my $class = $pf->class();
print "SNMP::Info determined this device to fall under subclass : $class
";
DESCRIPTION
Subclass for Free-BSD PF-Based devices
LLDP Support
LLDP Support is included but untested in this Device Class. It is reported that the available CDP/LLDP modules for net-snmp don't work on
FreeBSD (on which pfSense is based) as they assume certain Linux specific Ethernet structures. This problem is apparently solved on PF
based firewall appliances by using the ladvd package, for which a port may be found here: <http://www.freshports.org/net/ladvd/>. I'm not
sure if this module ties into Net-SNMP or not.
Inherited Classes
SNMP::Info::Layer3
SNMP::Info::LLDP
Required MIBs
FOKUS-MIB
Inherited Classes' MIBs
See "Required MIBs" in SNMP::Info::Layer3 for its own MIB requirements.
See "Required MIBs" in SNMP::Info::LLDP for its own MIB requirements.
GLOBALS
These are methods that return scalar values from SNMP
$pf->vendor()
Returns 'FreeBSD'
$pf->hasCDP()
Returns whether LLDP is enabled.
$pf->model()
Grabs the os version from "sysDescr"
$pf->os()
Returns 'Pf'
$pf->os_ver()
Tries to reference $pf->id() to one of the product MIBs listed above. Will probably return a truncation of the default OID for pf-
based systems "enterprises.12325.1.1.2.1.1".
Global Methods imported from SNMP::Info::Layer3
See documentation in "GLOBALS" in SNMP::Info::Layer3 for details.
TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash.
$pf->c_id()
Returns LLDP information.
$pf->c_if()
Returns LLDP information.
$pf->c_ip()
Returns LLDP information.
$pf->c_platform()
Returns LLDP information.
$pf->c_port()
Returns LLDP information.
Table Methods imported from SNMP::Info::Layer3
See documentation in "TABLE METHODS" in SNMP::Info::Layer3 for details.
Table Methods imported from SNMP::Info::LLDP
See documentation in "TABLE METHODS" in SNMP::Info::LLDP for details.
perl v5.12.4 2011-09-28 Info::Layer3::Pf(3pm)