Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Re: Script Error [syntax error at line] Post 302547330 by vbe on Monday 15th of August 2011 08:08:14 AM
Old 08-15-2011
As yazu corrected... but you had other typos, so:
Code:
#!/usr/bin/ksh
echo "Enter Two Numbers"
read a b
if [ $a -gt $b ]
then
   echo "$a Is Greater"
else
   echo "$b Is Greater"
fi

the executions gives:
Code:
ant:/home/vbe $ ./00001 
Enter Two Numbers
5 9
9 Is Greater

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

I got error like...syntax error on line 1, teletype

Hi All, when i executing scripts i got error like: syntax error on line 1, teletype expr: syntax error expr: syntax error expr: syntax error Please advise to me. Note: Yesterday it's working fine, 2day only i got error. (2 Replies)
Discussion started by: koti_rama
2 Replies

2. Shell Programming and Scripting

syntax error, need to redo one line in script :(

I have a script that processes a file with two columns (IDs and Idle session times): # cat /tmp/idle-ids.lst user1 2,390 user2 97 user3 93 user4 67 user5 56 user6 33 user7 22 user8 6 user9 2 user10 0 my script works, but has... (4 Replies)
Discussion started by: mr_manny
4 Replies

3. UNIX for Dummies Questions & Answers

awk Shell Script error : "Syntax Error : `Split' unexpected

hi there i write one awk script file in shell programing the code is related to dd/mm/yy to month, day year format but i get an error please can anybody help me out in this problem ?????? i give my code here including error awk ` # date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies

4. Shell Programming and Scripting

Help on shell script : syntax error at line 62: `end of file' unexpected

Hi All, I have written a korn script (code pasted below). It is giving the error while debugging "new.sh: syntax error at line 62: `end of file' unexpected". I have re-written the whole code in VI and explored all help related to this error on this Unix forum and tried it. Somehow, I could... (7 Replies)
Discussion started by: schandrakar1
7 Replies

5. Shell Programming and Scripting

Urgent: Script.sh: syntax error at line 72: `PROGRESS=$' unexpected

I have written a shell script to Automatically FTP a file. The script runs fine when doing it manually but when I schedule it using a crontab it gives me an error. . . . echo "-----------------Starting File FTP---------------------" >> $PROS_LOAD_LOG echo "open X.XX.XX.XXX" >>... (13 Replies)
Discussion started by: tanhajoy
13 Replies

6. Shell Programming and Scripting

ERROR: ./launch_full_backup.sh[18]: Syntax error at line 28 : `else' is not expected.

Help please! :confused: I have the following error with the following file and the emails are not arriving to the email, any idea please? ERROR: ./launch_full_backup.sh: Syntax error at line 28 : `else' is not expected. FECHA=`date +%d%m%y%H%M`... (2 Replies)
Discussion started by: villenan
2 Replies

7. Shell Programming and Scripting

Receiving error: ./ang.ksh[35]: 0403-057 Syntax error at line 116 : `done' is not expected.

Hi All I am quite new to Unix. Following is a shell script that i have written and getting the subject mentioned error. #!/bin/ksh #------------------------------------------------------------------------- # File: ang_stdnld.ksh # # Desc: UNIX shell script to extract Store information.... (3 Replies)
Discussion started by: amitsinha
3 Replies

8. Shell Programming and Scripting

Cannot execute/finish script because of last line syntax error: unexpected end of file/token `done'

first of all I thought the argument DONE is necessary for all scripts that have or begin with do statements which I have on my script, However, I still don't completely understand why I am receiving an error I tried adding another done argument statement but didn't do any good. I appreciate... (3 Replies)
Discussion started by: wolf@=NK
3 Replies

9. Shell Programming and Scripting

Error"syntax error at line 15: `end of file' unexpected"

While i m running below code, it is giving me the error"syntax error at line 15: `end of file' unexpected". Pls let me know what is wrong here..i tried many ways, but no luck dbSID="SWQE" usrname="apps" password="Wrgthrk3" count=0 while do sqlplus $usrname/$password@$dbSID... (5 Replies)
Discussion started by: millan
5 Replies

10. BSD

Keep getting error "-bash: ./.profile_z2: line 52: syntax error: unexpected end of file"

#!/bin/bash #-------------------------------------------------------- # Setup prompt # Author Zeeshan Mirza # Data: 06-08-2017 #-------------------------------------------------------- if then . ./.profile_custom_pre fi umask 022 set -o vi export EDITOR=vi export VISUAL=vi... (3 Replies)
Discussion started by: getzeeshan
3 Replies
Net::Sieve::Script::Condition(3pm)			User Contributed Perl Documentation			Net::Sieve::Script::Condition(3pm)

NAME
Net::Sieve::Script::Condition - parse and write conditions in sieve scripts SYNOPSIS
use Net::Sieve::Script::Condition; my $cond = Net::Sieve::Script::Condition->new('header'); $cond->match_type(':contains'); $cond->key_list('"[Test4]"'); $cond->header_list('"Subject"'); print $cond->write(); or my $cond = Net::Sieve::Script::Condition->new( 'anyof ( header :contains "Subject" "[Test]", header :contains "Subject" "[Test2]")' ); print $cond->write(); DESCRIPTION
Parse and write condition part of Sieve rules, see Net::Sieve::Script. Support RFC 5228, 5231 (relationnal) and regex draft CONSTRUCTOR
new Match and set accessors for each condition object in conditions tree, "test" is mandatory Internal id : id for condition, set by creation order condition : array of sub conditions parent : parent of sub condition AllConds : array of pointers for all conditions Condition parts not : 'not' or nothing test : 'header', 'address', 'exists', ... key_list : "subject" or ["To", "Cc"] header_list : "text" or ["text1", "text2"] address_part : ':all ', ':localpart ', ... match_type : ':is ', ':contains ', ... comparator : string part METHODS
equals Purpose : test conditions Return : 1 on equals conditions write Purpose : write rule conditions in text format Return : multi-line formated text AUTHOR
Yves Agostini CPAN ID: YVESAGO Univ Metz agostini@univ-metz.fr http://www.crium.univ-metz.fr COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.0 2008-09-15 Net::Sieve::Script::Condition(3pm)
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy