DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 10th November 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default Am I blind? syntax error: `(' unexpected

So I am trying to convert my bash script into ksh, and this is what I have in the file so far:

Code:
#!/bin/ksh

login()
{
        if [ "$ALPHA" = "" ]
        then
sendcmd BETA
else
sendcmd "$(xxd -c 32 -g 0 ${ZETA_ZETA} | awk '{print $2}')"
        fi
}
But when I run it:
Code:
$ ./test.sh  
./test.sh[3]: syntax error: `(' unexpected
Am I not seeing something here? I closed all of my () and I don't see any open parentheses...
Reply With Quote
  #2   (View Single Post)  
Old 10th November 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

Never mind, login() is already a pre-defined function in ksh that I didn't know about. Renamed my function and now it's working fine.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blind install ? sharris FreeBSD General 2 31st October 2010 12:29 PM
shc unistd.h:239: error: syntax error before '&' token laraaj OpenBSD General 3 11th September 2010 07:21 AM
Unexpected Change of owner:group in file system Dotiroygsbre Other BSD and UNIX/UNIX-like 0 15th August 2008 04:09 PM
Syntax Highlighting JMJ_coder Programming 17 22nd June 2008 02:24 PM
relayd (and hoststated) give syntax error for 'check script' gwl OpenBSD Security 2 2nd May 2008 04:53 PM


All times are GMT. The time now is 05:02 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick