Sponsored Content
Top Forums Shell Programming and Scripting syntax error near un expected token =~ Post 302378369 by Pauline mugisha on Monday 7th of December 2009 05:40:33 PM
Old 12-07-2009
syntax error near un expected token =~

Hello. Please help with this code. Returns an error message "syntax error near unexpected token =~. Conditional binary operator expected.


Code:
if [[ $a =~ "[^0-9]" ]] || [[ $b =~ "[^0-9]" ]]
then
echo "Enter only valid numbers"
fi


Last edited by pludi; 12-07-2009 at 06:59 PM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

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

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

3. Shell Programming and Scripting

syntax error near unexpected token `='

Hi all, This is a script which converts hex to bin. However am finding an error while executing syntax error near unexpected token `=' `($hexfile, $binfile) = @ARGV;' I am running using ./fil.pl <hexfile> <binfile> ################################################### # # this script... (3 Replies)
Discussion started by: jaango123
3 Replies

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

5. Shell Programming and Scripting

Syntax error near unexpected token `}' please help

I'm going mad not being able to get this to work. im assuming its only a simple mistake but its driving me bonkers trying to find it. Please if you can help me it would save me pulling my hair out!! Thanks #!/bin/bash -xv # #Config name="TEST Server" + name='TEST Server'... (6 Replies)
Discussion started by: Fisheh
6 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 '('

I tried to execute the code but I got this error ./Array.c: line 9: syntax error near unexpected token '(' ./Array.c: line 9: ' nvals = get_data(a,MAXARRAY);' and #include<stdio.h> #define MAXARRAY 1000 main() { int a, nvals; nvals =... (7 Replies)
Discussion started by: sgradywhite
7 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. Shell Programming and Scripting

Syntax error near unexpected token

Hi all, I have a simple script that doesn't work somehow. I can't seem to be spotting the cause of the malfunction. count=$((1)) for item in `cat test1.txt` printf %s `sed -n $((count))p test2.txt` > test3.txt count=$((count+1)) do something done I get ; ./why.sh: line 3:... (14 Replies)
Discussion started by: y33t
14 Replies

10. Ubuntu

Syntax error near unexpected token `('

detect_mouse_mvt.sh /home/andy/bin/detect_mouse_mvt.sh: line 4: syntax error near unexpected token `(' /home/andy/bin/detect_mouse_mvt.sh: line 4: `fh = file('/dev/input/mice')' #!/bin/bash # # fh = file('/dev/input/mice') while True: fh.read(3) print 'Mouse... (15 Replies)
Discussion started by: drew77
15 Replies
gss_verify_mic(3)					     Library Functions Manual						 gss_verify_mic(3)

NAME
gss_verify_mic() - check a cryptographic message integrity code (MIC) against a message to verify its integrity SYNOPSIS
DESCRIPTION
The routine verifies that a cryptographic MIC, contained in the token_buffer parameter, fits the supplied message. The application receiv- ing the message can use the qop_state parameter to check the strength of protection. Input Parameters context_handle Specifies the context on which the message arrived. message_buffer Specifies the message to be verified. token_buffer Specifies the token to be associated with the message. Output Parameters qop_state Returns the quality of protection gained from message integrity code (MIC). Specify NULL if not required. minor_status Returns a status code from the security mechanism. STATUS CODES
The following status codes can be returned: The routine was completed successfully. The token failed consistency checks. The MIC was incorrect. The token was valid, and contained a correct MIC for the message, but it had already been processed. The token was valid, and contained a correct MIC for the message, but it is too old. The token was valid, and contained a correct MIC for the message, but has been verified out of sequence. A later token has already been received. The token was valid, and contained a correct MIC for the message, but has been verified out of sequence. An earlier expected token has not yet been received. The context has already expired. The routine failed. Check the minor_status parameter for details. The context identified in the context_handle parameter was not valid. AUTHOR
was developed by Sun Microsystems, Inc. SEE ALSO
gss_get_mic(3), gss_wrap(3). The manpages for DCE-GSSAPI are included with the DCE-CoreTools product. To see those manpages add to gss_verify_mic(3)
All times are GMT -4. The time now is 08:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy