0403 057 Syntax Error
Contents |
Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts
0403 012 A Test Command Parameter Is Not Valid
and shell scripting languages here. Search Forums Show Threads aix 0403 057 Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... ksh 0403 057 learn linux and unix commands - unix shell scripting Receiving error: ./ang.ksh[35]: 0403-057 Syntax error at line 116 : `done' is not expected. Shell Programming and
0403-057 Syntax Error : `>' Is Not Expected
Scripting Thread Tools Search this Thread Display Modes #1 05-25-2010 amitsinha Registered User Join Date: May 2010 Last Activity: 27 August 2010, 2:57 AM EDT Posts: 4 Thanks: 1 Thanked 0 Times in 0 Posts Receiving error: ./ang.ksh[35]: 0403-057 Syntax error at line
0403 057 Syntax Error Is Not Matched
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. Code: #!/bin/ksh #------------------------------------------------------------------------- # File: ang_stdnld.ksh # # Desc: UNIX shell script to extract Store information. #------------------------------------------------------------------------- ### Set the global variables. CONNECT=$1 LOG=$MMHOME/log/ang_stdnld_`date +'%b_%d'`.log ERR=$MMHOME/error/err.ang_stdnld.`date +'%b_%d'` ##SCRIPT_HOME=$MMHOME/oracle/proc/bin ### Check if path where extracts are to be created is passed as arg. ### If this arg is Null, then default to PWD. if [ "$2" = "" ] then DIR=`pwd` echo "Path is not sent. Defaulting to PWD: "`pwd` else if [ -d $2 ] then DIR=$2 else echo "Path $2 does not exist" exit 1 fi fi #------------------------------------------------------------------------- # Function Name: ang_get_chain() # Purpose : Create store listing that needs to be processed to # extract the data. #------------------------------------------------------------------------- ang_get_chain() { echo "Getting the chain name...\n" >>$LOG # Set filename to contain this chain CHAIN=$DIR/stdnld_chain.lst $ORACLE_HOM
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn ksh: 0403-057 syntax error at line 1 : `(' is not expected. more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
0403-057 `(' Is Not Expected
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like syntax error: `(' is not expected you, helping each other. Join them; it only takes a minute: Sign up 0403-057 Syntax error at line 54: `(' is not expected up vote 0 down vote favorite arr=(`${ORACLE_HOME}/bin/sqlplus -s "${user}"/"${pass}"@ID < here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the http://unix.stackexchange.com/questions/232936/syntax-error-in-a-ksh-script-2-is-not-expected company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, http://www.perlmonks.org/bare/?node_id=322604 FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top is not Syntax error in a ksh script: `2' is not expected [closed] up vote -3 down vote favorite I am trying to get the MD5 of some ears in a Unix box using the fanout command but there are some errors. My code is: ears=ear1-ear2 cluster=abc dmgr=server1 k=$(expr `echo $ears | grep -o "-" | wc -l` + 1) fanout "$dmgr" " umask 022 ; for k in $(seq 1 $k) ; do for i in 057 syntax error $(echo $ears | cut -d'-' -f$k) ; do echo /appl/as/bin/md5 /appl/as/var/spool/ears/${cluster}/$i ; done ; done The error I am getting is as follows : ksh: 0403-057 Syntax error at line 2 : `2' is not expected. and it is unable to reference $i shell-script share|improve this question edited Sep 30 '15 at 22:57 roaima 19.2k21953 asked Sep 30 '15 at 7:12 amol singh 61 closed as unclear what you're asking by Gilles, muru, cuonglm, Archemar, Anthon Oct 1 '15 at 4:49 Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question. 2 It would be best if you detailed what you want to achieve and what results you expect from that command. –Nasha Sep 30 '15 at 7:27 i want to get md5 from a box named server1 –amol singh Sep 30 '15 at 7:29 2 you've an extra " in your fanout command. please try after correcting it ? –NewLands Sep 30 '15 at 7:39 There is no 2 on line 2. Also what you posted lacks a #! line. Post your actual, an AIX machine. Where is the error? Thanks, Eudoro #!/usr/bin/perl -w use strict; my(@proc,%cpu,%mem,$cpu,$mem,$user,$key,$lup); @proc = `ps -Ao "%U:%C:%z"`; for ($lup=1;$lup<=$#proc;$lup++) { ($user,$cpu,$mem)=split(/:/,$proc[$lup]); $cpu{$user}+=$cpu; $mem{$user}+=$mem; } foreach $key(keys %cpu) { print "$key\t\t$cpu{$key}\t\t$mem{$key}\n"; } [download] Error Message: ksh: 0403-057 Syntax error: `(' is not expected.Comment on Syntax ErrorDownload Code Replies are listed 'Best First'. Re: Syntax Error by Abigail-II (Bishop) on Jan 20, 2004 at 15:35UTC Error Message: ksh: 0403-057 Syntax error: `(' is not expected. Try feeding the program to perl. (Perl, that is. Perl, perl, perl. No 'a' in it). Abigail[reply] Re: Re: Syntax Error by eudoro (Initiate) on Jan 20, 2004 at 16:07UTC Sorry about the 'a'. How do I feed it to perl? I thought I just had to place the statement: #!/usr/bin/perl -w in the script. Eudoro[reply] Re: Re: Re: Syntax Error by Old_Gray_Bear (Bishop) on Jan 20, 2004 at 16:28UTC There are a couple of possibilities here. 1 -- The 'shebang line' ("#! /user ...") may have a leading space. The Shell, not finding '#!' as the first two characters takes off an tries to parse/run the "ksh" script it has just discovered. 2 -- The first line in the file is empty, so the Shell having no other guidance takes off and fails during the parse. ---- I Go Back to Sleep, Now. OGB [reply] Re: Syntax Error by Abigail-II (Bishop) on Jan 20, 2004 at 16:46UTC Re: Re: Re: Re: Syntax Error by dragonchild (Archbishop) on Jan 20, 2004 at 16:34UTC Re: Syntax Error by Abigail-II (Bishop) on Jan 20, 2004 at 16:48UTC Placing a she-bang line is only half the trick - the kernel must also sniff at it. How are you calling your program, and what are its execution bits? Abigail[reply] Re: Re: Syntax Error by Anonymous Monk on Jan 21, 2004 at 14:35UTC Re: Syntax Error by Abigail-II (Bishop) on Jan 21, 2004 at 14:37UTC Re: Syntax Error by Anonymous Monk on Jan 21, 2004 at 14:39UTC If I type: perl test.pl it works. Thanks to everyone for all your help. Eudoro[reply] Back to Seekers of Perl Wisdom