05-01-2014
As CarloM said, it runs fine. The blank line seems not to be the problem - show your Perl script please.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Working on AIX using the following for loop.
for a in `find /edi/iTracTEST/sessions -name nohup.out -print`
do
echo $a
done
On the command line it works fine, but insert the code in a file and then running it, it does not want to work. I get the following back.
' is not... (3 Replies)
Discussion started by: hugow
3 Replies
2. Shell Programming and Scripting
hi friends,
i wrote one simple shell script.. in that am using for loop... when i am trying to execute the script.it shows syntax error at for loop line '((' unexpected.
#!/bin/ksh
##
##### To find no of files in the directory
NOF=`ls -l /root/COMM/LOGS/eds/20081025| wc -l`... (5 Replies)
Discussion started by: rdhaprakasam
5 Replies
3. Solaris
Hi,
Iam trying to add a while loop in my script in the below way which gets value from count file and checks if its not equal to 0.If yes then it shld echo me a message.
while //count file has some number other than 0
do
echo "count is not zero"
done
But iam getting this error:... (5 Replies)
Discussion started by: jyothi_wipro
5 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I get the following output
98 -1
98 0
./get_AB04-time: line 79: ((: i< && 0 !=7 : syntax error: operand expected (error token is "&& 0 !=7 ")
I have this part of code. Line 79 is the line of the for loop.
echo ${OCCURRENCE} $i_START
CASE=0;
i_END=${i_START}... (4 Replies)
Discussion started by: f_o_555
4 Replies
5. Shell Programming and Scripting
Hello All,
I am having a problem with an “if loop” within a “while loop” in my Korn Shell program. The basic concept of the program is that it searches for the existence of a series of load files in a load directory, and once it finds one of these files, it begins the following process:
· Creates... (4 Replies)
Discussion started by: jonesdk5
4 Replies
6. Shell Programming and Scripting
the program just prints all the command line arguments
Getting error in the program
error
./hellow: line 13: 0: command not found
./hellow: line 13: 0: command not found
below is the program
#!/bin/bash
num=$#
echo $num
if
then
echo "No arguments are passed ."
else
... (7 Replies)
Discussion started by: BHASKARREDDY006
7 Replies
7. Shell Programming and Scripting
I have a file Table.out having table name like this
Table_Emp
Table_Exp
Table_Fcr
To show first 10 rows .. I' wrtng a script like this ..
#!/bin/ksh
cat /tmp/table.out|while read -r table vbar1
do
<connect to db>
then
select * from $table limit 10; > /tmp/1.out
done
... (3 Replies)
Discussion started by: netdbaind
3 Replies
8. Shell Programming and Scripting
Hi All,
while executing this code ,I'm gettign below Error
if_test: line 3:
#!/bin/bash
if ;
then
echo "this is aginity;"
elif ;
then
echo "this is informatica;"
fi
exit (3 Replies)
Discussion started by: netdbaind
3 Replies
9. Shell Programming and Scripting
This is my first ever bash script. What i wish to achieve is to find all files in current directory except the script file and count lines in each found file. Some thing seems to be wrong with the if statement :confused: Please help why it does not work? and maybe you have some ideas how to improve... (3 Replies)
Discussion started by: chinababy
3 Replies
10. UNIX for Beginners Questions & Answers
There are two files abc_123.dat and abc_345.dat if at least one file exists then enter into the loop and remove file and exit.
In first iteration, deleting files successfully
but "else" statement executing after deleting files."else" should execute only if there is no file in the directory.... (1 Reply)
Discussion started by: Rajesh123
1 Replies
LEARN ABOUT OSX
tap::parser::sourcehandler::perl
TAP::Parser::SourceHandler::Perl(3pm) Perl Programmers Reference Guide TAP::Parser::SourceHandler::Perl(3pm)
NAME
TAP::Parser::SourceHandler::Perl - Stream TAP from a Perl executable
VERSION
Version 3.23
SYNOPSIS
use TAP::Parser::Source;
use TAP::Parser::SourceHandler::Perl;
my $source = TAP::Parser::Source->new->raw( 'script.pl' );
$source->assemble_meta;
my $class = 'TAP::Parser::SourceHandler::Perl';
my $vote = $class->can_handle( $source );
my $iter = $class->make_iterator( $source );
DESCRIPTION
This is a Perl TAP::Parser::SourceHandler - it has 2 jobs:
1. Figure out if the TAP::Parser::Source it's given is actually a Perl script ("can_handle").
2. Creates an iterator for Perl sources ("make_iterator").
Unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly.
METHODS
Class Methods
"can_handle"
my $vote = $class->can_handle( $source );
Only votes if $source looks like a file. Casts the following votes:
0.9 if it has a shebang ala "#!...perl"
0.75 if it has any shebang
0.8 if it's a .t file
0.9 if it's a .pl file
0.75 if it's in a 't' directory
0.25 by default (backwards compat)
"make_iterator"
my $iterator = $class->make_iterator( $source );
Constructs & returns a new TAP::Parser::Iterator::Process for the source. Assumes "$source->raw" contains a reference to the perl script.
"croak"s if the file could not be found.
The command to run is built as follows:
$perl @switches $perl_script @test_args
The perl command to use is determined by "get_perl". The command generated is guaranteed to preserve:
PERL5LIB
PERL5OPT
Taint Mode, if set in the script's shebang
Note: the command generated will not respect any shebang line defined in your Perl script. This is only a problem if you have compiled a
custom version of Perl or if you want to use a specific version of Perl for one test and a different version for another, for example:
#!/path/to/a/custom_perl --some --args
#!/usr/local/perl-5.6/bin/perl -w
Currently you need to write a plugin to get around this.
"get_taint"
Decode any taint switches from a Perl shebang line.
# $taint will be 't'
my $taint = TAP::Parser::SourceHandler::Perl->get_taint( '#!/usr/bin/perl -t' );
# $untaint will be undefined
my $untaint = TAP::Parser::SourceHandler::Perl->get_taint( '#!/usr/bin/perl' );
"get_perl"
Gets the version of Perl currently running the test suite.
SUBCLASSING
Please see "SUBCLASSING" in TAP::Parser for a subclassing overview.
Example
package MyPerlSourceHandler;
use strict;
use vars '@ISA';
use TAP::Parser::SourceHandler::Perl;
@ISA = qw( TAP::Parser::SourceHandler::Perl );
# use the version of perl from the shebang line in the test file
sub get_perl {
my $self = shift;
if (my $shebang = $self->shebang( $self->{file} )) {
$shebang =~ /^#!(.*perl.*?)(?:(?:s)|(?:$))/;
return $1 if $1;
}
return $self->SUPER::get_perl(@_);
}
SEE ALSO
TAP::Object, TAP::Parser, TAP::Parser::IteratorFactory, TAP::Parser::SourceHandler, TAP::Parser::SourceHandler::Executable,
TAP::Parser::SourceHandler::File, TAP::Parser::SourceHandler::Handle, TAP::Parser::SourceHandler::RawTAP
perl v5.16.2 2012-10-25 TAP::Parser::SourceHandler::Perl(3pm)