Sponsored Content
Top Forums Shell Programming and Scripting for loop with internal unix command in statement throwing error Post 302667541 by vbe on Friday 6th of July 2012 11:35:41 AM
Old 07-06-2012
Can you change it to:
Code:
cat ${TSP_FILEPATH_BARCODE_TXT} | grep "^barcode" | while read BARCODE_LINE
do 
    etc...
done

(no backtick... to see if they are in cause...)
This User Gave Thanks to vbe For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

For loop statement - catch error

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)
Discussion started by: lumdev
4 Replies

2. UNIX for Dummies Questions & Answers

Remote login/copy command throwing an error

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)
Discussion started by: ashish_panpalia
1 Replies

3. Shell Programming and Scripting

How to convert unix command into Awk statement

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)
Discussion started by: krishna_gnv
1 Replies

4. UNIX for Dummies Questions & Answers

forcefully throwing error : unix script

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)
Discussion started by: dr46014
1 Replies

5. Shell Programming and Scripting

for loop throwing an error

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)
Discussion started by: mac4rfree
6 Replies

6. UNIX for Dummies Questions & Answers

Mailx command in unix shell script, its throwing below error

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)
Discussion started by: only4satish
10 Replies

7. Shell Programming and Scripting

[Solved] FOR loop / IF statement returning error

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)
Discussion started by: jfxdavies
5 Replies

8. Shell Programming and Scripting

sed command throwing error while deleting a line from a file

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)
Discussion started by: vivek d r
4 Replies

9. Shell Programming and Scripting

For Loop throwing error

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)
Discussion started by: pokhraj_d
5 Replies

10. Shell Programming and Scripting

Curl statement throwing extra statements

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
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)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy