03-03-2018
The solution to my question is the command
do EXPR;
, having as EXPR the script-2!
That way the script-2 will have defined in script-1 some variables;
it will process everything, printing on STDOUT what it should print (the script-2), and
it will set any variable that will be available in the script-1 after completing the script-2.
After finishing the script-2 control coming back to script-1
That is all I been looking for!
(Hmm, after review my question, surprizingly realizing that I have used the 'do ..'
How it happening that I have mislead myself to have it not enough, I am not sure!
--- My apologizes for all that mess!!!! )
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello evreyone,
this is my first post, and to say i'm new to this is an understatement.
I know very little about perl scripts and hope some one can help me.
i'm looking to get a script that a cron job can execute.
what the script needs to to is
1) connect to a mysql database
2) go to a... (2 Replies)
Discussion started by: Exader
2 Replies
2. Shell Programming and Scripting
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies
3. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
4. Shell Programming and Scripting
How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ?
Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies
5. Shell Programming and Scripting
Hi Folks,
I have created a script last month to retrive files thru FTP and cronjob was running fine till yesterday. But the naming convention of the daily file is Filename_<date>.xml
where date is YYYYMMDD. But today i have received file name as Filename_20110232.xml :(
Part of my Perl... (4 Replies)
Discussion started by: Sendhil.Kumaran
4 Replies
6. Shell Programming and Scripting
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
Discussion started by: newbie_01
3 Replies
7. Shell Programming and Scripting
hi All,
i have to modify a shell script written in Perl. i have to use execute immediate within this. i have to create a temporary table but it should have name like ar_data_$mmyyyy , how can i achieve this?
any help on this would be highly appriciated. (6 Replies)
Discussion started by: lovelysethii
6 Replies
8. Shell Programming and Scripting
Not sure what I am doing wrong here, but I can print the list with no issue. Just a blank screen with the 'do'.
#!/usr/bin/perl
open FILE, "upslist.txt";
while ($line=<FILE>){
if ($line=~/^(.*?),(.*?)$/){
#print "ups:$1 string:$2\n";
do 'check_snmp_mgeups-0.1.pl -H $1 -C $2';
} ... (1 Reply)
Discussion started by: mrlayance
1 Replies
9. Shell Programming and Scripting
Hello
Can some help with write part of perl script
I need something like this in perl
SSH="/bin/ssh -o BatchMode=yes -o"
USER="test"
SRV="server"
SCRIPT_TO_EXEC="/tmp/test.sh" -> shell script
OUT=/tmp/out.file
${SSH} -l ${USER} ${SRV} 'sudo /usr/bin/ksh -s' < ${SCRIPT_TO_EXEC} >> ${OUT}... (1 Reply)
Discussion started by: vikus
1 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am new to perl and have a script to which i want to ensure that no matter how many ever times i execute the script it should execute only once per day. Cronjob is not a safe method as I want to built in capability inside the script. (1 Reply)
Discussion started by: ctrld
1 Replies
LEARN ABOUT DEBIAN
perl-depends
PERL-DEPENDS(1) cvs status - formatter PERL-DEPENDS(1)
NAME
perl-depends - Roughly find out module depends from Perl file(s)
SYNOPSIS
perl-depends [options] FILE [FILE ...]
DESCRIPTION
Find out roughly the modules the program uses. This is based on the idea, that Perl evaluates the "use" commands at compile time and stores
the loaded module information into the %INC variable. By examining the loaded modules and comparing them against the standard Perl modules,
the external module dependencies can be roughly estimated.
The depends information can be used to determine what external modules have to be installed before a program can be used.
The target FILE have to be instrumented with the dependency checking code. The resulting "binary" is then stored in a temporary file which
the user runs.
This program does not run the instrumented files because it cannot know what possible options need to be passed for the program to trigger
"no behavior". That is, something that doesn't actually involve executing the "binary" in real. Such options passed would include
--version, --dry-run, invalid options like --generate-syntax-error-now, or invalid files etc. to make program stop on error. The user can
know better the details of running the intrumented file.
An example of output: the external module depends here is 'Regexp::Common' and the rest of them can be ignored.
Regexp::Common Regexp/Common.pm
Regexp::Common::CC Regexp/Common/CC.pm
...
OPTIONS
-e, --extension=EXT
Use extension EXT for instrumented files. The default is ".tmp".
-h, --help
Print text help
--help-html
Print help in HTML format.
--help-man
Print help in manual page man(1) format.
-v, --verbose LEVEL
Print informational messages. Increase numeric LEVEL for more verbosity.
-V, --version
Print contact and version information.
EXAMPLES
Instrument a file, run it to see results and delete instrumentation:
perl-depends file.pl
perl file.pl.tmp --version
rm *.tmp
TROUBLESHOOTING
None.
ENVIRONMENT
None.
FILES
None.
EXIT STATUS
This program's exit status is not defined.
The instrumented programs exit status is 1 in case external moduels are displayed and 0 if no external modules are found.
DEPENDENCIES
Uses standard Perl modules.
BUGS AND LIMITATIONS
None.
SEE ALSO
cpan(1)
AVAILABILITY
http://freshmeat.net/projects/perl-depends
AUTHOR
Jari Aalto <jari.aalto@cante.net>
LICENSE
Copyright (C) 2009-2011 Jari Aalto <jari.aalto@cante.net>
This program is free software; you can redistribute and/or modify program under the terms of GNU General Public license either version 2 of
the License, or (at your option) any later version.
perl v5.10.1 2011-03-24 PERL-DEPENDS(1)