Sponsored Content
Top Forums Programming Newbie Question.. -> error: syntax error before ';' token Post 302338389 by reelflytime on Monday 27th of July 2009 08:13:50 PM
Old 07-27-2009
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...
Code:
int H_YesNo(TMCHAR *Prompt, int DefVal)
{
TMCHAR YesNo = '\0';

  tmprintf(&tmBundle, _TMC("{0}"),Prompt);
  while (!tmstrchr(_TMC("NY"),(YesNo = toupper(*tmgets(&YesNo)))))
  {
    tmprintf(&tmBundle, _TMC("Must enter a Y or N.  Please reenter.\n"));
    tmprintf(&tmBundle, _TMC("{0}"),Prompt);
    YesNo = '\0';
  }
  return ((YesNo == 'Y') || ((YesNo == '\0') && (DefVal)));
}


Last edited by vino; 07-28-2009 at 04:51 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sh syntax error unexpected token done

I'm getting the following error: line 21: syntax error near unexpected token `done` line 21: `done` and I haven't been able to figure out why. Here is my code #!/bin/sh if ; then echo 'Usage: rename getexp/replStr ' exit 0 fi arg = $1 shift while ; do (5 Replies)
Discussion started by: NullPointer
5 Replies

2. UNIX for Advanced & Expert Users

Syntax error near unexpected token

Hi, When I run the below shell script I'm getting the error " syntax error near unexpected token `" Script: REM :: File Name : Refresh_OTL.bat REM :: Parameters : %1 - Region REM :: : %2 - Cube Type REM :: : REM :: Notes : REM ============================== set ENVIRONMENT... (2 Replies)
Discussion started by: tomailraj
2 Replies

3. Shell Programming and Scripting

Syntax error near unexpected token `('

Guys , This is an output of my script errored out for "Syntax error near unexpected token `(' " Can someone tell me whats wrong with my script. Below is my original script pasted. #!/bin/bash Script Creation Date 01/21/2010 Author baraghun ... (7 Replies)
Discussion started by: raghunsi
7 Replies

4. Shell Programming and Scripting

Syntax error near unexpected token `done'

Hi all, Here is a simple script that is working in one server and is giving a syntax error in other server. Can somebody help me ? #!/bin/bash # ftp files done < $file errors: I tried..with no success: if ; then (21 Replies)
Discussion started by: Lenora2009
21 Replies

5. UNIX for Dummies Questions & Answers

> 5 ")syntax error: operand expected (error token is " error

im kinda new to shell scripting so i need some help i try to run this script and get the error code > 5 ")syntax error: operand expected (error token is " the code for the script is #!/bin/sh # # script to see if the given value is correct # # Define errors ER_AF=86 # Var is... (4 Replies)
Discussion started by: metal005
4 Replies

6. Shell Programming and Scripting

Syntax error near unexpected token `('

What do I do here? #!/bin/bash payload=-1 AND 1=IF(21,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)# hash=`echo -n $payload md5sum tr -d 'n' sed 'ss-sg' md5sum tr -d 'n' sed 'ss-sg'` curl --data cs2=chronopay&cs1=$payload&cs3=$hash&transaction_type=rebill... (2 Replies)
Discussion started by: iiiiiiiiiii
2 Replies

7. Shell Programming and Scripting

Syntax error near unexpected token `else'

Hi, I am trying to read the session log through script. But it keeps showing me some error near. I have tried everything. Even tried converting the script using sed command to remove the hidden characters(\r).But nothing seems to be working.Below is the script : #!/bin/bash cd... (6 Replies)
Discussion started by: Aryan12345
6 Replies

8. Shell Programming and Scripting

Syntax error near unexpected token `|'

Hi All; I try to write a bash code and I am using command substitution. My code is like: #!/bin/bash IP="10.0.0.1 10.0.0.2" PORT="22 80" USERNAME="admin" SCRIPT_HOST="adminHost" HOME_DIR=/home/admin SCRIPT_DIR=$HOME_DIR/scripts script="sudo /my_remote_script.sh" SSH="/usr/bin/ssh... (7 Replies)
Discussion started by: Meacham12
7 Replies

9. How to Post in the The UNIX and Linux Forums

Syntax error near unexpected token `('

I have 2 files like a.txt and b.txt and the content is as below cat a.txt 810750125 117780 /BSCSQAT4A/bscsqat4a/lib/jar/wclt_common.jar 1803152428 13300 /BSCSQAT4A/bscsqat4a/lib/jar/WFMSSupportTool.jar 2663502779 67049 /BSCSQAT4A/bscsqat4a/lib/jar/wma.jar 687942896 665272... (1 Reply)
Discussion started by: ranabhavish
1 Replies

10. 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
EFIKEYGEN(1)						      General Commands Manual						      EFIKEYGEN(1)

NAME
efikeygen - command line tool for generating keys to use for PE image signing SYNOPSIS
efikeygen <[--ca | -C] [--self-sign | -S] | [--signer=nickname]> [--token=token | -t token] [--nickname=nickname | -n nickname] [--common-name=common name | -c common name] [--url=url | -u url] [--serial=serial | -s serial] DESCRIPTION
efikeygen is a command line tool for generating keys and certificates to be used with pesign. These are standard X.509 certificates, and can potentially be generated with any certificate creation tool. efikeygen simply sets generates keys with sensible options set for a key to be used for PE image signing. OPTIONS
--ca The certificate being generated is for a CA. --self-sign The generated certificate is to be self signed. --signer=nickname Nickname of certificate to be used to sign the generated certificate. --token=token Use the specified NSS token's certificate database. --nickname=nickname The nickname to use for the generated certificate. --common-name=common-name The X.509 Common Name for the generated certificate. This should be in rfc2253 syntax, i.e. "CN=John Doe,OU=editing,O=New York Times,L=New York,ST=NY,C=US" --url=url Informational url regarding objects signed with this key. --serial=serial number Serial number for use with this key. A certificate is identified by its signer and its serial number, so it's best not to ever re- use this value with the same signer. SEE ALSO
pesign(1) AUTHORS
Peter Jones Mon Jan 07 2013 EFIKEYGEN(1)
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy