9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I tried writing a script and there was a problem with SFTP part
can some one correct where is is the mistake
Enveronment file
#!/bin/bash
export HOST_NAME=<>
export USER_NAME=<>
export PASSWORD=<>
export SOURCE_PATH=/u03/informatica/current/server/infa_shared/TgtFiles/mfg
export... (4 Replies)
Discussion started by: spradeep86
4 Replies
2. Shell Programming and Scripting
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies
3. Shell Programming and Scripting
###############
#filename.sh
###############
CUREENT_DATE=02
log_file_path="$CUREENT_DATE"-"${0##%*/}`|cut -d "." -f1|awk -F "/" '{print $NF}'`"".log"
echo $log_file_path
################
#output required
02-filename.log (6 Replies)
Discussion started by: mohitmehral
6 Replies
4. Shell Programming and Scripting
ret=`sqlplus -s /nolog << EOF
connect $db_user/$db_pwd@$db_sid;
SPOOL ./$DirectoryName/TableData.txt;
set pagesize 0 feedback off verify off heading off echo off linesize 150
while read var_ack_party_name
do
select * from bus_event where ack_party_name like... (13 Replies)
Discussion started by: rkrish
13 Replies
5. Shell Programming and Scripting
#!/bin/ksh
db_user=$DB_USER_NAME
db_pwd=$DB_PASSWORD
db_sid=$TWO_TASK
if ; then
echo "\tUsage: MoveUsageProcessing <BC Log file Name>"
exit 1
else
BCLogFileName=$1
fi
grep -i 'MoveUsage daemon needs to run on this account before it can be billed' $1 |awk -F\| '{for(i=0;++i<=NF;) if($i ~... (1 Reply)
Discussion started by: Rajesh Putnala
1 Replies
6. Emergency UNIX and Linux Support
Please correct my script if it any exceptional, since im calling other external script with in my script.
#!/bin/bash
FE1=TMM
DT1=/home/myHome/dated_1
REPORT=/home/otherHome/Report.sh
## Run the report for FE1 & DT1
cd /home/myHome
SERV_LST=/home/myHome/srvc-lst
echo "Welcome to... (5 Replies)
Discussion started by: raghunsi
5 Replies
7. Shell Programming and Scripting
Wrong post (2 Replies)
Discussion started by: tuffEnuff
2 Replies
8. Shell Programming and Scripting
I am new to awk, can somone please correct the following script
awk -F "," 'BEGIN {
foreach ((getline < "file1.csv") > 0)
{i++
a=1 --> assuming the first column in the row will be stored in a
foreach (a in f1) {
if (a == $5) continue
print a;
}
}
} file2.csv'
Here is what I... (11 Replies)
Discussion started by: nuthalapati
11 Replies
9. Shell Programming and Scripting
Here is the script. I am not able to increment and Print echo "2=" ${arr}
(Bold line)
Can someone please help me correct it? I am thinking there is some escape sequence error. Just started learning scripts ...
Thanks
#!/bin/ksh
set -A arr a1 a2 a3 a4
# START
Server1=gmi
... (6 Replies)
Discussion started by: psreddy1234
6 Replies
Apache::TestMM(3) User Contributed Perl Documentation Apache::TestMM(3)
NAME
Apache::TestMM - Provide MakeMaker Wrapper Methods
SYNOPSIS
require Apache::TestMM;
# import MY::test and MY::clean overrides for MM
Apache::TestMM->import(qw(test clean));
# parse command line args
Apache::TestMM::filter_args();
# autogenerate the script
Apache::TestMM::generate_script('t/TEST');
DESCRIPTION
"Apache::TestMM" provides wrappers for the "ExtUtils::MakeMaker" craft, making it easier to extend the autogenerated Makefile with
"Apache::Test".
FUNCTIONS
"import"
use Apache::TestMM qw(test clean);
or:
Apache::TestMM->import(qw(test clean));
Imports "MY::" overrides for the default "ExtUtils::MakeMaker" test and clean targets, as if you have defined:
sub MY::test {...}
sub MY::clean {...}
in Makefile.PL. "Apache::TestMM" does this for you so that these Makefile targets will run the Apache server and the tests for it, and
clean up after its mess.
"filter_args"
push @ARGV, '-apxs', $apxs_path;
Apache::TestMM::filter_args();
WriteMakefile(...);
When "WriteMakefile()" is called it parses @ARGV, hoping to find special options like "PREFIX=/home/stas/perl". "Apache::Test" accepts a
lot of configuration options of its own. When "Apache::TestMM::filter_args()" is called, it removes any "Apache::Test"-specific options
from @ARGV and stores them internally, so when "WriteMakefile()" is called they aren't in @ARGV and thus won't be processed by
"WriteMakefile()".
The options can be set when Makefile.PL is called:
% perl Makefile.PL -apxs /path/to/apxs
Or you can push them manually to @ARGV from the code:
push @ARGV, '-apxs', $apxs_path;
When:
Apache::TestMM::generate_script('t/TEST');
is called, "Apache::Test"-specific options extracted by "Apache::TestMM::filter_args()" are written to the autogenerated file. In our
example, the autogenerated t/TEST will include:
%Apache::TestConfig::Argv = qw(apxs /path/to/apxs);
which is going to be used by the "Apache::Test" runtime.
The other frequently used options are: "-httpd", telling where to find the httpd (usually when the "-apxs" option is not used),
"-libmodperl" to use a specific mod_perl shared object (if your mod_perl is built as DSO), "-maxclients" to change the default number of
the configured "MaxClients" directive, "-port" to start the server on a specific port, etc. To get the complete list of available
configuration options and their purpose and syntax, run:
% perl -MApache::TestConfig -le 'Apache::TestConfig::usage()'
You may wish to document some of these in your application's README file, especially the "-apxs" and "-httpd" options.
"generate_script"
Apache::TestMM::generate_script('t/TEST');
"generate_script()" accepts the name of the script to generate and will look for a template with the same name and suffix .PL. So in our
example it'll look for t/TEST.PL. The autogenerated script t/TEST will include the contents of t/TEST.PL, and special directives, including
any configuration options passed via "filter_args()" called from Makefile.PL, special fixup code, etc.
perl v5.16.2 2011-02-07 Apache::TestMM(3)