Sponsored Content
Full Discussion: Syntax error, but where?
Top Forums Shell Programming and Scripting Syntax error, but where? Post 302938749 by sea on Wednesday 18th of March 2015 05:11:52 PM
Old 03-18-2015
:doh: thanks alot
 

9 More Discussions You Might Find Interesting

1. 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

2. AIX

nim mksysb error :/usr/bin/savevg[33]: 1016,07: syntax error

-------------------------------------------------------------------------------- Hello, help me please. I am trying to create a mksysb bakup using nim. I am geting this error, how to correct it ? : Command : failed stdout: yes stderr: no... (9 Replies)
Discussion started by: astjen
9 Replies

3. Shell Programming and Scripting

sed error : Syntax error: redirection unexpected

My script is throwing the error 'Syntax error: redirection unexpected' My line of code.. cat nsstatustest.html | sed s/<tr><td align="left">/<tr><td align="left" bgcolor="#000000"><font color="white">/ > ztmp.Ps23zp2s.2-Fpps3-wmmm0dss3 HTML tags are getting in the way but they're needed to... (3 Replies)
Discussion started by: phpfreak
3 Replies

4. Programming

Newbie Question.. -> error: syntax error before ';' token

Hello, the following is generating a error at the line "tmprintf(&tmBundle, _TMC("{0}"),Prompt);"... a bit lost as I am diving into this debug... Thank you in advance... int H_YesNo(TMCHAR *Prompt, int DefVal) { TMCHAR YesNo = '\0'; tmprintf(&tmBundle, _TMC("{0}"),Prompt); while... (3 Replies)
Discussion started by: reelflytime
3 Replies

5. 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

6. 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

7. Linux

Ambiguous redirect error and syntax error when using on multiple files

Hi, I need help on following linux bash script. When I linux commands for loop or while loop on individual file it runs great. but now I want the script to run on N number of files so it gives me ambiguous redirect error on line 12 and syntax error on line 22 : (pls help ); #!/bin/bash #... (16 Replies)
Discussion started by: Madhusudan Das
16 Replies

8. Shell Programming and Scripting

IF section problem. syntax error: unexpected end of file error

Hello, I have another problem with my script. Please accept my apologies, but I am really nooby in sh scripts. I am writing it for first time. My script: returned=`tail -50 SapLogs.log | grep -i "Error"` echo $returned if ; then echo "There is no errors in the logs" fi And after... (10 Replies)
Discussion started by: jedzio
10 Replies

9. UNIX for Beginners Questions & Answers

Getting this error syntax error near unexpected token `)'

Hi Everyone, my script was running Ok, but suddenly it started giving this error. ./update_env_bi.sh: line 54: syntax error near unexpected token `)' ./update_env_bi.sh: line 54: `sed -i "s/PORT=*1/PORT=$2/" repository.xml' The line 54 has this code. sed -i "s/PORT=*1/PORT=$2/"... (2 Replies)
Discussion started by: shajay12
2 Replies
Class::Gomor::Array(3pm)				User Contributed Perl Documentation				  Class::Gomor::Array(3pm)

NAME
Class::Gomor::Array - class and object builder, array version SYNPOSIS
# Create a base class in BaseClass.pm package My::BaseClass; require Class::Gomor::Array; our @ISA = qw(Class::Gomor::Array); our @AS = qw(attribute1 attribute2); our @AA = qw(attribute3 attribute4); our @AO = qw(other); # You should initialize yourself array attributes sub new { shift->SUPER::new(attribute3 => [], attribute4 => [], @_) } # Create indices and accessors My::BaseClass->cgBuildIndices; My::BaseClass->cgBuildAccessorsScalar(@AS); My::BaseClass->cgBuildAccessorsArray(@AA); sub other { my $self = shift; @_ ? $self->[$self->cgGetIndice('other')] = [ split(/ /, shift) ] : @{$self->[$self->cgGetIndice('other')]}; } 1; # Create a subclass in SubClass.pm package My::SubClass; require My::BaseClass; our @ISA = qw(My::BaseClass); our @AS = qw(subclassAttribute); My::SubClass->cgBuildIndices; My::SubClass->cgBuildAccessorsScalar(@AS); sub new { shift->SUPER::new( attribute1 => 'val1', attribute2 => 'val2', attribute3 => [ 'val3', ], attribute4 => [ 'val4', ], other => [ 'none', ], subclassAttribute => 'subVal', ); } 1; # A program using those classes my $new = My::SubClass->new; my $val1 = $new->attribute1; my @values3 = $new->attribute3; my @otherOld = $new->other; $new->other("str1 str2 str3"); my @otherNew = $new->other; print "@otherNew "; $new->attribute2('newValue'); $new->attribute4([ 'newVal1', 'newVal2', ]); DESCRIPTION
This class is a subclass from Class::Gomor. It implements objects as array references, and inherits methods from Class::Gomor. GLOBAL VARIABLES
See Class::Gomor. METHODS
new (hash) Object constructor. This is where user passed attributes (hash argument) are checked against valid attributes (gathered by cgGetAttributes method). Valid attributes are those that exists (doh!), and have not an undef value. The default is to check this, you can avoid it by setting $NoCheck global variable (see perldoc Class::Gomor). cgBuildIndices You MUST call this method one time at the beginning of your classes, and all subclasses (even if you do not add new attributes). It will build the matching between object attributes and their indices inside the array object. Global variables will be created in your class, with the following format: $__attributeName. cgBuildAccessorsScalar (array ref) cgBuildAccessorsArray (array ref) See Class::Gomor. cgGetIndice (scalar) Returns the array indice of specified attribute passed as a parameter. You can use it in your programs to avoid calling directly the global variable giving indice information concerning requesting object, thus avoiding using `no strict 'vars';'. This method is usually used when you build your own accessors (those using attributes defined in @AO). cgClone [ (scalar) ] You can clone one of your objects by calling this method. An optional parameter may be used to create multiple clones. Cloning will occure only on the first level attributes, that is, if you have attributes containing other objects, they will not be cloned. cgFullClone [ (scalar) ] This method is the same as cgClone, but will clone all attributes recursively, but only if they are subclassed from Class::Gomor. So, objects created with other modules than Class::Gomor::Array or Class::Gomor::Hash will not be cloned. Another thing to note, there is no catch for cycling references (when you link two objects with each others). You have been warned. cgDumper Will return a string as with Data::Dumper Dumper method. This is useful for debugging purposes, because an arrayref object does not include attributes names. SEE ALSO
Class::Gomor AUTHOR
Patrice <GomoR> Auffret COPYRIGHT AND LICENSE
Copyright (c) 2004-2009, Patrice <GomoR> Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. perl v5.10.1 2009-05-23 Class::Gomor::Array(3pm)
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy