04-16-2012
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
:confused:Hi ,
I have a script as shown below:
rpttxt()
{
name="$*"
awk '/'"${name}"'/ {print $2 $3"=" $4}' file.txt
}
xx = rpttxt "COL_HEAD_1"
awk 'BEGIN {printf("%36s \n ","'"$xx"'")}'
rpttxt() is a function..I want to store the final result of this function in... (3 Replies)
Discussion started by: jisha
3 Replies
2. Shell Programming and Scripting
I am new to perl, and need a script to pull a CSV file, strip out 2 leading columns, and 2 ending columns, and resave the file in a new location. The file is basic and has less than 10,000 records. Secondly, can I schedule perl scripts to run daily? Can someone provide the basic script to... (1 Reply)
Discussion started by: cobbjob
1 Replies
3. Shell Programming and Scripting
hi all,
I have 3 perl scripts a.pl,b.pl and c.pl
each of these work when i pass a date for eg: perl c.pl 2010-05-27
now i want to write a perl script that would call the 3 scripts and make it run all the 3 scripts (a.pl,b.pl,c.pl) parallelly rather than 1 after the other.......
pls... (2 Replies)
Discussion started by: siva_nagarajan
2 Replies
4. Shell Programming and Scripting
This is the ldf file
dn: sdcsmsisdn=1000000049,sdcsDatabase=subscriberCache,dc=example,dc=com
objectClass: sdcsSubscriber
objectClass: top
postalCode: 29600
sdcsServiceLevel: 10
sdcsCustomerType: 14
givenName: Adelia
sdcsBlackListAll: FALSE
sdcsOwnerType: T-Mobile
sn: Actionteam... (1 Reply)
Discussion started by: LinuxFriend
1 Replies
5. 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
6. Shell Programming and Scripting
I am creating a startup script for an application. This application's startup script is in bash. It will also need to call a perl script (which I will not be able to modify) for the application environment prior to calling the application. The problem is that this perl script creates a new shell... (5 Replies)
Discussion started by: leepet01
5 Replies
7. Shell Programming and Scripting
I am trying to run a perl script which needs input arguments from a parent perl script, but doesn't seem to work. Appreciate your help in this regard.
From parent.pl
$input1=123;
$input2=abc;
I tried calling it with
system("/usr/bin/perl child.pl $input1 $input2");
and
`perl... (1 Reply)
Discussion started by: grajp002
1 Replies
8. Shell Programming and Scripting
Can someone let me know how could I achieve this
In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies
9. Shell Programming and Scripting
Hi,
I am working on a sever A.
I want to write a perl script to execute a shell script persent on the server B.
please help me in this.
thanks in advance. (3 Replies)
Discussion started by: anandgodse
3 Replies
10. Shell Programming and Scripting
I have a function which does awk proceessing
sub mergeDescription {
system (q@awk -F'~' '
NR == FNR {
A = $1
B = $2
C = $0
next
}
{
n = split ( C, V, "~" )
if... (3 Replies)
Discussion started by: crypto87
3 Replies
LEARN ABOUT DEBIAN
findbin
FindBin(3perl) Perl Programmers Reference Guide FindBin(3perl)
NAME
FindBin - Locate directory of original perl script
SYNOPSIS
use FindBin;
use lib "$FindBin::Bin/../lib";
or
use FindBin qw($Bin);
use lib "$Bin/../lib";
DESCRIPTION
Locates the full path to the script bin directory to allow the use of paths relative to the bin directory.
This allows a user to setup a directory tree for some software with directories "<root>/bin" and "<root>/lib", and then the above example
will allow the use of modules in the lib directory without knowing where the software tree is installed.
If perl is invoked using the -e option or the perl script is read from "STDIN" then FindBin sets both $Bin and $RealBin to the current
directory.
EXPORTABLE VARIABLES
$Bin - path to bin directory from where script was invoked
$Script - basename of script from which perl was invoked
$RealBin - $Bin with all links resolved
$RealScript - $Script with all links resolved
KNOWN ISSUES
If there are two modules using "FindBin" from different directories under the same interpreter, this won't work. Since "FindBin" uses a
"BEGIN" block, it'll be executed only once, and only the first caller will get it right. This is a problem under mod_perl and other
persistent Perl environments, where you shouldn't use this module. Which also means that you should avoid using "FindBin" in modules that
you plan to put on CPAN. To make sure that "FindBin" will work is to call the "again" function:
use FindBin;
FindBin::again(); # or FindBin->again;
In former versions of FindBin there was no "again" function. The workaround was to force the "BEGIN" block to be executed again:
delete $INC{'FindBin.pm'};
require FindBin;
KNOWN BUGS
If perl is invoked as
perl filename
and filename does not have executable rights and a program called filename exists in the users $ENV{PATH} which satisfies both -x and -T
then FindBin assumes that it was invoked via the $ENV{PATH}.
Workaround is to invoke perl as
perl ./filename
AUTHORS
FindBin is supported as part of the core perl distribution. Please send bug reports to <perlbug@perl.org> using the perlbug program
included with perl.
Graham Barr <gbarr@pobox.com> Nick Ing-Simmons <nik@tiuk.ti.com>
COPYRIGHT
Copyright (c) 1995 Graham Barr & Nick Ing-Simmons. All rights reserved. This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
perl v5.14.2 2011-09-26 FindBin(3perl)