Following minor modifications to take into account real Cisco configs (e.g. multi-word section names and different white spaces), the final script looks like this:
I post it for other people, who might find it useful.
thanks again!
Miron
Last edited by Franklin52; 10-17-2014 at 03:21 PM..
Reason: Please use code tags, thanks
Hi all
My text file looks like this:
start doc
... (certain number of records)
REC3|Emma|info|
REC3|Lukas|info|
REC3|Arthur|info|
... (certain number of records)
end doc
start doc
... (certain number of records)... (4 Replies)
Hi
Having a file as below
file.txt
error Server Network Name Dept Date Time
===========================================================================================================================
0 ServerA LAN1 AAA IT01 04/30/2008 09:16:26
0 ... (3 Replies)
i need help with my script....
i am suppose to grab files within a certain date range
now i have done that already using the touch and find command (found them in other threads)
touch -d "$date_start" ./tmp1
touch -d "$date_end" ./tmp2
find "$data_location" -maxdepth 1 -newer ./tmp1 !... (6 Replies)
In unix how to sort in reverse order based on second field in a text file.
$ cat data1
David:501
Albie:503
Shaun:502
The expected output:
Albie:503
Shaun:502
David:501
Please help :) (4 Replies)
i have file a
123
234
456
567
678
and file b
123|xxx|hhh|ppp or zzz
234|rrr|ttt|xxx
432|ttt|mmm|nnn
678|cft|byt|mop
i want to compare file a to file b such that when each of the lines in file a can be found in file b column1 and also xxx or hhh or ppp or zzz can be... (12 Replies)
I have a tab delimited file with 5 columns
79 A B 20.2340 6.1488 8.5086 1.3838
87 A B 0.1310 0.0382 0.0054 0.1413
88 A B 46.1651 99.0000 21.8107 0.2203
89 A B 0.1400 0.1132 0.0151 0.1334
114 A B 0.1088 0.0522 0.0057 0.1083
115 A B... (2 Replies)
Hello Experts,
I am truly a beginner in shell and perl . Need an urgent help with sorting a file. please help. wouldn't mind whether in perl or shell script.
Here are the details.
------------------------------------------------------
Input Text file EX:... (9 Replies)
Discussion started by: pradyumnajpn10
9 Replies
LEARN ABOUT DEBIAN
alzabo::index
Alzabo::Index(3pm) User Contributed Perl Documentation Alzabo::Index(3pm)NAME
Alzabo::Index - Index objects
SYNOPSIS
foreach my $i ($table->indexes)
{
foreach my $c ($i->columns)
{
print $c->name;
print '(' . $i->prefix($c) . ')' if $i->prefix($c);
}
}
DESCRIPTION
This object represents an index on a table. Indexes consist of columns and optional prefixes for each column. The prefix specifies how
many characters of the columns should be indexes (the first X chars). Some RDBMS's do not have a concept of index prefixes. Not all col-
umn types are likely to allow prefixes though this depends on the RDBMS. The order of the columns is significant.
METHODS
columns
Returns an ordered list of the "Alzabo::Column" objects that are being indexed.
prefix ("Alzabo::Column" object)
A column prefix is, to the best of my knowledge, a MySQL specific concept, and as such cannot be set when using an RDBMSRules module for a
different RDBMS. However, it is important enough for MySQL to have the functionality be present. It allows you to specify that the index
should only look at a certain portion of a field (the first N characters). This prefix is required to index any sort of BLOB column in
MySQL.
This method returns the prefix for the column in the index. If there is no prefix for this column in the index, then it returns undef.
unique
Returns a boolean value indicating whether the index is a unique index.
fulltext
Returns a boolean value indicating whether the index is a fulltext index.
function
For function indexes, this returns the function being indexed.
id
The id is generated from the table, column and prefix information for the index. This is useful as a canonical name for a hash key, for
example.
Returns a string that is the id which uniquely identifies the index in this schema.
table
Returns the "Alzabo::Table" object to which the index belongs.
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.8.8 2007-12-23 Alzabo::Index(3pm)