01-20-2013
Thanks Guys, you help and explanations have been fantastic.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Could you please explain me the below statement -- phrase wise.
sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt > xyz.txt
if suppose $cnt contains value: 10
it copies last 9 lines of abc.txt to xyz.txt
why it is copying last 9 rather than 10.
and also what is ba and $D over there in... (4 Replies)
Discussion started by: subbukns
4 Replies
2. Shell Programming and Scripting
Hello everyone,
I found this command line in a website:
perl -pi.bak -we's/\z/Your new line\n/ if $. == 2;' your_text_file.txt
With this command line you can insert a new line anywhere you want in a text without overwriting what's in it.
-p causes perl to assume a loop around your... (4 Replies)
Discussion started by: goude
4 Replies
3. Shell Programming and Scripting
Hi to all.
I'm trying to sort this with the Unix command sort.
user1:12345678:3.5:2.5:8:1:2:3
user2:12345679:4.5:3.5:8:1:3:2
user3:12345687:5.5:2.5:6:1:3:2
user4:12345670:5.5:2.5:5:3:2:1
user5:12345671:2.5:5.5:7:2:3:1
I need to get this:
user3:12345687:5.5:2.5:6:1:3:2... (7 Replies)
Discussion started by: daniel.gbaena
7 Replies
4. UNIX for Dummies Questions & Answers
can someone please explain the below sed command..
sed 's/\(*|\)\(.*\)/\2\1/' (6 Replies)
Discussion started by: raghu_shekar
6 Replies
5. Shell Programming and Scripting
sed '$!N; /^\(.*\)\n\1$/!P; D'
i found this file which removes duplicates irrespective for sorted or unsorted file. keep first occurance and remove the further occurances.
can any1 explain how this is working..
i need to remove duplicates following file. duplicate criteria is not the... (3 Replies)
Discussion started by: mukeshguliao
3 Replies
6. UNIX for Advanced & Expert Users
can anyone please tell me what does this expression means , i am under probation and need some explanation :)
$AUDIT_DIR -type f -mtime +$AUDIT_EXPIRE \ -exec rm {} > /dev/null 2>&1 \;
AUDIT_DIR="/var/log/"
AUDIT_EXPIRE='30'
Please use code tags! (4 Replies)
Discussion started by: semaan
4 Replies
7. Shell Programming and Scripting
Hi All
I ran a script in Linux.
In the script i have lines like
&& echo "Failed: Missing ${CM_ENV_FILE} \n" && return 1
. ${CM_ENV_FILE}
Where CM_ENV_FILE = /data/ds/dpr_ebicm_uat//etl/cm3_0/entities/BBME/parameters/cm.env
But its taking this path... (1 Reply)
Discussion started by: vee_789
1 Replies
8. Shell Programming and Scripting
Will someone give me an explanation on how the sed command below works.
sed 's/.*//'
Thanks! (3 Replies)
Discussion started by: scj2012
3 Replies
9. UNIX for Beginners Questions & Answers
I tried to use sort utility and typed sort --help, read one of lines; its -k option, and part of it:
I am really not getting it
Anyone do me a useful favor to save me out of my ignorance ?
Please use correct tags as required by forum rules! (1 Reply)
Discussion started by: abdulbadii
1 Replies
10. UNIX for Beginners Questions & Answers
Hi Folks,
I am struggling to understand nawk command which was used by another developer.
Can you please explain what each character or string is doing here below:
if ; then (3 Replies)
Discussion started by: kirans.229
3 Replies
LEARN ABOUT DEBIAN
parse::errorstring::perl
Parse::ErrorString::Perl(3pm) User Contributed Perl Documentation Parse::ErrorString::Perl(3pm)
NAME
Parse::ErrorString::Perl - Parse error messages from the perl interpreter
VERSION
version 0.15
SYNOPSIS
use Parse::ErrorString::Perl;
my $parser = Parse::ErrorString::Perl->new;
# or: my $parser = Parse::ErrorString::Perl->new(lang => 'FR')
# to get localized explanations
my @errors = $parser->parse_string($string_containing_stderr_output);
foreach my $error(@errors) {
print 'Captured error message "' .
$error->message .
'" in file ' . $error->file .
' on line ' . $error->line . "
";
}
METHODS
new(lang => $lang)
Constructor. Receives an optional "lang" parameter, specifying that error explanations need to be delivered in a language different
from the default (i.e. English). Will try to load "POD2::$lang::perldiag".
parse_string($string)
Receives an error string generated from the perl interpreter and attempts to parse it into a list of
"Parse::ErrorString::Perl::ErrorItem" objects providing information for each error.
SEE ALSO
splain
ACKNOWLEDGEMENTS
Part of this module is based on code from splain.
BUGS
Please report any bugs or feature requests to "bug-parse-errorstring-perl at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-ErrorString-Perl>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Parse::ErrorString::Perl
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Parse-ErrorString-Perl>
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Parse-ErrorString-Perl>
o CPAN Ratings
<http://cpanratings.perl.org/d/Parse-ErrorString-Perl>
o Search CPAN
<http://search.cpan.org/dist/Parse-ErrorString-Perl/>
AUTHORS
o Petar Shangov, "<pshangov at yahoo.com>"
o Gabor Szabo <http://szabgab.com/>
o Ahmad M. Zawawi <ahmad.zawawi@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Petar Shangov.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.10.1 2010-11-29 Parse::ErrorString::Perl(3pm)