10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I would like to make a script which will get the line from file list (ex. passkey) and put it into further processing.
The main problem is that lines, in text file contains all specials characters, and whitespaces too, as these that was used as a extremmaly-safe passwords. I have written... (4 Replies)
Discussion started by: elxa1
4 Replies
2. Red Hat
Hi
In opensuse we have this nice version control variable I use much when designing rpm spec files:
rpm --showrc | grep suse_version
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1700
-14: suse_version 1140But I do not find anything close to this in rhel/centos
The only way... (0 Replies)
Discussion started by: mortenb
0 Replies
3. Shell Programming and Scripting
Good day people,
Hereby wish to have your advise for below:
I have some .jar files, some script files (install.sh, action.sh) , and a libaes.so file. Basically, the .jar files compute the operation of my system and define the working directory for my system.
My current scenario:
i trigger... (1 Reply)
Discussion started by: cielle
1 Replies
4. Shell Programming and Scripting
Hi am new to perl script ..
i need some useful tutorials links to learn perl script..
and a sample script to call a php file from perl script..
thanks.. (3 Replies)
Discussion started by: senkerth
3 Replies
5. Shell Programming and Scripting
How to make RPM not write to RPM database if RPM fails to deploy?
IE I create an rpm spec file that contains the following
if
then
exit 1
fi
My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies
6. Shell Programming and Scripting
I'm new to this. This installer just installs PHP code so NOTHING needs to be built (do I still need to use the build and buildroot directories?). I would just like to create an installer (spec) that:
1) unpacks a tarball
2) moves the unpacked files to the installation target
3) runs a script... (2 Replies)
Discussion started by: stevenswj
2 Replies
7. Shell Programming and Scripting
Hi Guys,
I need some help related to my script... I will explain you briefly about my script and requirement
I written one script which will monitor all my services in the server and send a mail to me....
There are about 10 Services(Processes) running on my services, and I have written 10... (1 Reply)
Discussion started by: Anji
1 Replies
8. Shell Programming and Scripting
Hi,
I am writting a script and i am using SYBASE database. i have a config file with my logging credentials. when i am calling the file via isql command its throwing me an error. see the below code.
while read line
do
SERVER=`echo $linea |awk -F"|" ' {print $1} ' `
... (6 Replies)
Discussion started by: dazdseg
6 Replies
9. Shell Programming and Scripting
It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from:
/home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'.
I can't get the awk syntax right:
awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies
10. UNIX for Advanced & Expert Users
Hi
I have a shell script that call a sql file. The sql file will create a spool file.
My requirement is, when ever i get an OS error like file not found. I have to log it in a log file.
Could some who worked in a like scenario help me by giving the code sample.
Many Thanks.. (1 Reply)
Discussion started by: chintapalli001
1 Replies
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)