0403-009 The specified number is not valid for this command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting 0403-009 The specified number is not valid for this command
# 1  
Old 04-02-2013
0403-009 The specified number is not valid for this command

Hi,
Am using a if condition to match a pattern but I get the following error..
Code:
if [ $hidType -eq "powerpump" -a "$sup" -eq 8 ]
then
  echo "The value is $hidType"
return 0
elseif [[ $hidType -eq "mode" ] -a [ $sup1 -eq $sup2 ]]
  echo "The value is $hidType"
        return 0
fi

I get the following error
Code:
+ echo The value is mode
The value is mode
+ [ mode -eq power -a 4 -eq 8 ]
./a2[11]: mode: 0403-009 The specified number is not valid for this command.

I have used "=" instead of "-eq" the same error is seen..
Please help..Smilie
# 2  
Old 04-02-2013
What shell are you using? The code should be something like:
Code:
if [ "$hidType" == "power" ] && [ $support -eq 8 ]
then
        echo "The value is $hidType"
        return 0
elif [ "$hidType" == "COMPATIBLE_mode" ] && [ $support -eq $support_prev ]
then
        echo "The value is $hidType"
        return 0
fi

# 3  
Old 04-02-2013
Here is an alternative similar syntax you could use:
Code:
if [ "$hidType" = "power" -a $support -eq 8 ]; then
  echo "The value is $hidType"
  return 0
elif [ "$hidType" = "COMPATIBLE_mode" -a $support -eq $support_prev ]; then
  echo "The value is $hidType"
  return 0
fi

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script accepting variables in valid number format

Hi Experts I would like to ask if there is a way to validate if the variable passed is in this kind of sample format "06-10" or "10-01". It was really a challenge to me on how to start and echnically the "6-10" stands for "June 10" and "10-01" stands as "October 1", overall it needs to have ... (3 Replies)
Discussion started by: ersan-poguita
3 Replies

2. Shell Programming and Scripting

PL/SQL: Specified Number Is Not Valid

Hi I have Unix shell script that invokes PL/SQL procedure. The batch job when executed terminated with the error message:-unlimited: The specified number is not valid for this command.Please let me know what is the root cause of the issue and how to fix the issue. Thanks (1 Reply)
Discussion started by: moonkhan1
1 Replies

3. Shell Programming and Scripting

[BASH] (own) command is not a valid identifier

Heya fellows Yes, script-tools and TUI are both my 'children', so i cant go anywhere (else) and ask for help/bugfixes as i need to write them myself. However i do need help to understand error messages at times (or get hints what else might cause them), so here we go: Since my new computer... (4 Replies)
Discussion started by: sea
4 Replies

4. Shell Programming and Scripting

Help with error "por: 0403-012 A test command parameter is not valid."

Hi, im asking for help with the next script: echo ^; then if then printf "\033 query1.sh: export TERM=vt100 export ORACLE_TERM=at386 export ORACLE_HOME=/home_oracle8i/app/oracle/product/8.1.7 export ORACLE_BASE=/home_oracle8i/app/oracle export... (8 Replies)
Discussion started by: blacksteel1988
8 Replies

5. Shell Programming and Scripting

403-009 The specified number is not valid for this command.

Error Message: dm2_oraver: 9xdm2_oraver2: LT11/w_standard/gold_wh/install/dm2_updatetns.ksh: 11MAR13: 0403-009 The spe cified number is not valid for this command. if means the line number in the ksh, it is ((CntNew=Cnt+1)). Please let me know the best way to debug and find it out. I am... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

6. Shell Programming and Scripting

if condition error: test: 0403-004 Specify a parameter with this command

Hi all, I would like to ask if there's something wrong with my if - else condition, i couldn't run the script perfectly due to the error in my if - else condition stating that "test: 0403-004 Specify a parameter with this command." below is the snippet of my script if && && ] then echo... (5 Replies)
Discussion started by: jihmantiquilla
5 Replies

7. Shell Programming and Scripting

A test command parameter is not valid

Hello, Getting error "A test command parameter is not valid" when trying to run the code below under /sbin/sh AA = "12:00" CHK=$(date +"%H:%M") if then print "Yes" fi Getting 2 errors: 1) "AA: not found" 2) "Specify a parameter with this command" Thanks, IS Please... (5 Replies)
Discussion started by: schureki
5 Replies

8. Shell Programming and Scripting

awk command - not a valid identifier message

Trying to run the following awk command : export com.mics.ara.server.tools.sch_reports.Runner.num_threads=`awk -F= '!/^#/ && /com.mics.ara.server.tools.sch_reports.Runner.num_threads/{print $2}' $BKUPDIR/env.properties` -bash: export:... (6 Replies)
Discussion started by: venhart
6 Replies

9. Shell Programming and Scripting

Whether a string is a valid unix command

How to find a string which is entered in command promt is a valid unix command or not?. Thanks in advance ~Saravana (2 Replies)
Discussion started by: tsaravanan
2 Replies

10. UNIX for Dummies Questions & Answers

pwd: A specified flag is not valid for this command.

Probably a very straight forward question but please be easy on me, I am v. new to UNIX! A script that I have runs the line tmp=`pwd -H` It works fine, but I needed to make a couple of other changes to the script, nowhere near this line but now this line reports: pwd: A specified flag... (2 Replies)
Discussion started by: Paxton
2 Replies
Login or Register to Ask a Question