05-20-2013
This User Gave Thanks to balajesuri For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Everyone,
Perl command syntax that would display my ... C:\dir ....
Regards,
asabzevari (1 Reply)
Discussion started by: asabzevari
1 Replies
2. UNIX for Advanced & Expert Users
hi all
i was going through some perl code i came across this line and i am not getting what is exactly going on ..
$$this{localtion} = GetName->GetVarName("EXE_DIR") ;
what is the red part doing in above code (2 Replies)
Discussion started by: zedex
2 Replies
3. Shell Programming and Scripting
All,
Does it matter what perl verios your running when you get syntax errors?
on version 5.6.1 the code works fine, but on 5.8.0 the code gets errors?
#!/usr/bin/perl
#use strict;
#use warnings;
my $mess = 'messages';
my $mess1 = 'messages.1';
my $mess2 = 'messages.2';
my... (13 Replies)
Discussion started by: bigben1220
13 Replies
4. Shell Programming and Scripting
Im new at scripting and im trying to write a script using perl that will make sure there are 2 command line integer arguments and then check if the 2nd argument is greater than the first. i believe im close but still receive my error message even when i have 2 arguments and the second part gives me... (6 Replies)
Discussion started by: livewire06
6 Replies
5. Shell Programming and Scripting
Hi,
I am a newbie to PERL and working on a script. When running it I get a lot of compilation errors.
The actual command in the program (which is within a case structure) is given below
# This gives the actual count of inquires from a log file (It works fine when I type this on the... (2 Replies)
Discussion started by: nurani
2 Replies
6. Shell Programming and Scripting
I'm just trying to confirm that I understand someone's code correctly.
If someone has code that says:
$foo ||= mysub();
I'm assuming that it means if $foo is nothing or undef, then assign it some value via mysub(). If I'm wrong on this, please let me know.
Also, what's the difference... (4 Replies)
Discussion started by: mrwatkin
4 Replies
7. Programming
Hi,
i am running this code but i am getting syntax error
#!/usr/bin/perl
use warnings;
use strict;
use XML::LibXML;
use XML::LibXML::Reader;
use Data::Dumper;
my $file;
open( $file, 'DTC_Specification_transformed.xml');
my $reader = XML::LibXML::Reader->new( IO => $file ) or die... (1 Reply)
Discussion started by: veerubiji
1 Replies
8. Programming
Hallo everybody,
I have a following problem - I'm doing a map funciont to fill in a HTML table and I want to use some radiobutton groups. Unfortunatelly, they are grouped by names, so I have to add some "counter" that will divide one row from another, and I'm using CGI.pm for generating the... (3 Replies)
Discussion started by: duskos
3 Replies
9. UNIX for Dummies Questions & Answers
Query with perl syntax
Aim: is to change a perl script to use a new file
I was required to replace
- entries \"$entries\"
with
-lib <full_path_to_filename>
So in the code detector.pm
sub rundetector
{
my $class = shift;
mkdir($resultDirectory);
my... (3 Replies)
Discussion started by: sa@@
3 Replies
10. Shell Programming and Scripting
Greetings!
Here's what I believe is a "simple one" for the community tonight ;)
What I'm trying to do is assign a "true/false" value to a variable depending upon whether a named process (some-process) exists; and then test for this value in the succeeding logic. I banged my head against the... (2 Replies)
Discussion started by: LinQ
2 Replies
LEARN ABOUT NETBSD
checkbashisms
CHECKBASHISMS(1) General Commands Manual CHECKBASHISMS(1)
NAME
checkbashisms - check for bashisms in /bin/sh scripts
SYNOPSIS
checkbashisms script ...
checkbashisms --help|--version
DESCRIPTION
checkbashisms, based on one of the checks from the lintian system, performs basic checks on /bin/sh shell scripts for the possible presence
of bashisms. It takes the names of the shell scripts on the command line, and outputs warnings if possible bashisms are detected.
Note that the definition of a bashism in this context roughly equates to "a shell feature that is not required to be supported by POSIX";
this means that some issues flagged may be permitted under optional sections of POSIX, such as XSI or User Portability.
In cases where POSIX and Debian Policy disagree, checkbashisms by default allows extensions permitted by Policy but may also provide
options for stricter checking.
OPTIONS
--help, -h
Show a summary of options.
--newline, -n
Check for "echo -n" usage (non POSIX but required by Debian Policy 10.4.)
--posix, -p
Check for issues which are non POSIX but required to be supported by Debian Policy 10.4 (implies -n).
--force, -f
Force each script to be checked, even if it would normally not be (for instance, it has a bash or non POSIX shell shebang or appears
to be a shell wrapper).
--extra, -x
Highlight lines which, whilst they do not contain bashisms, may be useful in determining whether a particular issue is a false posi-
tive which may be ignored. For example, the use of "$BASH_ENV" may be preceded by checking whether "$BASH" is set.
--version, -v
Show version and copyright information.
EXIT VALUES
The exit value will be 0 if no possible bashisms or other problems were detected. Otherwise it will be the sum of the following error val-
ues:
1 A possible bashism was detected.
2 A file was skipped for some reason, for example, because it was unreadable or not found. The warning message will give details.
SEE ALSO
lintian(1).
AUTHOR
checkbashisms was originally written as a shell script by Yann Dirson <dirson@debian.org> and rewritten in Perl with many more features by
Julian Gilbey <jdg@debian.org>.
DEBIAN
Debian Utilities CHECKBASHISMS(1)