Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Dear friends, following is the output of a script from which I want to remove spaces and new-line characters.
Example:-
Line1 abcdefghijklmnopqrstuvwxyz
Line2 mnopqrstuvwxyzabcdefghijkl
Line3 opqrstuvwxyzabcdefdefg
Here in above example, at every starting line there is a “tab” &... (4 Replies)
Hi,
I need a command in UNIX KSH below is the description...
MAPPING DESCRIPTION ="Test Mapping for the calid inputs" ISVALID ="YES" NAME ="m_test_xml" OBJECTVERSION ="1" VERSIONNUMBER ="1"
unix ksh command to read the DESCRIPTION and write to a file
Test Mapping for the calid inputs... (3 Replies)
Hello,
I'm brand new to Sun/Solaris.
I have a Sun Blade 150, with SunOS 5.8.
I wanted to make a backup to prevent future data loss, so I put the disk in a normal PC with Windows XP to try to make a backup with Norton Ghost, the disk was detected, but not the file volume, so I place the disk... (6 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT DEBIAN
lib::abs
lib::abs(3pm) User Contributed Perl Documentation lib::abs(3pm)NAME
lib::abs - "lib" that makes relative path absolute to caller.
SYNOPSIS
Simple use like "use lib ...":
use lib::abs qw(./mylibs1 ../mylibs2);
use lib::abs 'mylibs';
Extended syntax (glob)
use lib::abs 'modules/*/lib';
There are also may be used helper function from lib::abs (see example/ex4):
use lib::abs;
# ...
my $path = lib::abs::path('../path/relative/to/me'); # returns absolute path
DESCRIPTION
The main reason of this library is transformate relative paths to absolute at the "BEGIN" stage, and push transformed to @INC. Relative
path basis is not the current working directory, but the location of file, where the statement is (caller file). When using common "lib",
relative paths stays relative to curernt working directory,
# For ex:
# script: /opt/scripts/my.pl
use lib::abs '../lib';
# We run `/opt/scripts/my.pl` having cwd /home/mons
# The @INC will contain '/opt/lib';
# We run `./my.pl` having cwd /opt
# The @INC will contain '/opt/lib';
# We run `../my.pl` having cwd /opt/lib
# The @INC will contain '/opt/lib';
Also this module is useful when writing tests, when you want to load strictly the module from ../lib, respecting the test file.
# t/00-test.t
use lib::abs '../lib';
Also this is useful, when you running under "mod_perl", use something like "Apache::StatINC", and your application may change working
directory. So in case of chdir "StatINC" fails to reload module if the @INC contain relative paths.
RATIONALE
Q: We already have "FindBin" and "lib", why we need this module?
A: There are several reasons:
1) "FindBin" could find path incorrectly under "mod_perl"
2) "FindBin" works relatively to executed binary instead of relatively to caller
3) Perl is linguistic language, and `use lib::abs "..."' semantically more clear and looks more beautiful than `use FindBin; use lib
"$FindBin::Bin/../lib";'
4) "FindBin" b<will> work incorrectly, if will be called not from executed binary (see <http://github.com/Mons/lib-abs-vs-findbin>
comparison for details)
BUGS
None known
COPYRIGHT & LICENSE
Copyright 2007-2010 Mons Anderson.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Mons Anderson, "<mons@cpan.org>"
CONTRIBUTORS
Oleg Kostyuk, "<cub@cpan.org>"
perl v5.10.1 2010-11-16 lib::abs(3pm)