I'm having a question about for loops. (bash)
I have the following for example:
for file in `ls *.txt`
do
read file ...
done
Now when there is a file present there is no problem, now when there is no file present I get the following output in my standard mail box : "No such... (4 Replies)
Hi
We had 3 server -hp112and hp146 here hp112 is production server and hp146 is staging server used for load.
when i am trying to run follwing command
rcp abc hp112:/dnbusr1/gbid/gbid02 it's trowing an error :-
remshd: Login incorrect.
But same command is working wise versa -
rcp abc... (1 Reply)
Hi all,
How can i use the below unix command in AWK . Can any one please suggest me how i can use.
sed -e "s/which first.sh/which \$0/g" $shell > $shell.sal
where $0=current program name(say current.sh)
$shell=second.sh (1 Reply)
how can i make one script fail if some condition is not satisfied.i m writing if ..else logic in script.i need some standard command to do that ,, (1 Reply)
Hi Guys,
I am trying a simple for loop which is throwing an error.
Below is my code:
#/bin/sh
set -A array "are" "you" "there";
for ( i = 0 ; i < ${#array} ; i++ )
do
echo ${array}
done
I am getting this error
tci001wasd02 $ sh -vx array_for.sh
#/bin/sh
set -A array "are"... (6 Replies)
How to use Mailx command in unix shell script, its throwing below error
#!/bin/ksh
let x=3
If ; then
mailx -s “ $x is greater than 2” example@gmail.com << EOF
This is the message body
EOF
fi
its throwing error as syntax error at EOF... (10 Replies)
The code at the bottom is a simplified example of what we have.
If I use the following:
&& echo "echo failed"
$? returns 1
When I use
if ; then echo "echo failed" ; fi
$? returns 0
Does anyone know what's wrong with this?
Using AIX 6.1 and KSH
for NUM in 1 2 3
do
... (5 Replies)
Hi all,
I ahve a program which has to delete a line in a file... if i run the sed command through shell prompt it works fine. But if run it using code its throwing error. May i know where i am doing wrong.
the file has 3 lines
# cat /root/.ssh/known_hosts... (4 Replies)
Hello Gurus,
I am writing one script at linux.
The logic is
There is a find command which will find some specific files daily and store at a variable
Then echo that variable .
Now when I am trying to read the variable by using for loop it is throwing error as below:cat: CKDT.dat: No such... (5 Replies)
Hi all,
I am running a curl statement in my script to extract some information form a remote server.
My curl statement is :
curl --socks5 142.133.134.164:1082 'http://11.229.52.71:8011/WebApp/common/version'
This gives me an output of :
$ curl --socks5 142.133.134.164:1082... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
LEARN ABOUT DEBIAN
gd::barcode::iata2of5
Barcode::IATA2of5(3pm) User Contributed Perl Documentation Barcode::IATA2of5(3pm)NAME
GD::Barcode::IATA2of5 - Create IATA2of5 barcode image with GD
SYNOPSIS
ex. CGI
use GD::Barcode::IATA2of5;
binmode(STDOUT);
print "Content-Type: image/png
";
print GD::Barcode::IATA2of5->new('1234567890')->plot->png;
with Error Check
my $oGdBar = GD::Barcode::IATA2of5->new('A12345678');
die $GD::Barcode::IATA2of5::errStr unless($oGdBar); #Invalid Characters
$oGdBar->plot->png;
DESCRIPTION
GD::Barcode::IATA2of5 is a subclass of GD::Barcode and allows you to create IATA2of5 barcode image with GD.
new
$oGdBar = GD::Barcode::IATA2of5->new($sTxt);
Constructor. Creates a GD::Barcode::IATA2of5 object for $sTxt. $sTxt has numeric characters([0-9]).
plot()
$oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);
creates GD object with barcode image for the $sTxt specified at new method. $iHeight is height of the image. If NoText is 1, the image has
no text image of $sTxt.
ex.
my $oGdB = GD::Barcode::IATA2of5->new('12345678');
my $oGD = $oGdB->plot(NoText=>1, Height => 20);
# $sGD is a GD image with Height=>20 pixels, with no text.
barcode()
$sPtn = $oGdBar->barcode();
returns a barcode pattern in string with '1' and '0'. '1' means black, '0' means white.
ex.
my $oGdB = GD::Barcode::IATA2of5->new('12345678');
my $sPtn = $oGdB->barcode();
$errStr
$GD::Barcode::IATA2of5::errStr
has error message.
$text
$oGdBar->{$text}
has barcode text based on $sTxt specified in new method.
AUTHOR
Kawai Takanori GCD00051@nifty.ne.jp
COPYRIGHT
The GD::Barocde::IATA2of5 module is Copyright (c) 2000 Kawai Takanori. Japan. All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
SEE ALSO
GD::Barcode
perl v5.12.3 2003-05-29 Barcode::IATA2of5(3pm)