"bad number" message


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting "bad number" message
# 1  
Old 05-23-2005
"bad number" message

Hi,

running a script fine , i get twice the following message and whether i put "set -x" , i don't see what's going wrong :

/users/notes01/scripts/sad/util/verif_boot_notes.ksh[13]: Ma: bad number

any ideas ?

regards
Christian
# 2  
Old 05-23-2005
Code:
#!/bin/ksh

typeset -i num

num='foo'

# 3  
Old 05-23-2005
Sorry , i don't understand the relationship with my "bad number" !

What is "Ma:" ?

Christian
# 4  
Old 05-23-2005
Quote:
Originally Posted by Nicol
Sorry , i don't understand the relationship with my "bad number" !

What is "Ma:" ?

Christian
if you run my sample script [a.sh]you get:
./a.sh[5]: foo: bad number

In your case it seems like you're assigning a value of 'Ma' to an integer variable on line 13 in the script /users/notes01/scripts/sad/util/verif_boot_notes.ksh
# 5  
Old 05-23-2005
Thanks for your explanation , i will look !

christian
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Solaris

Help:"Bad checksum in disk label" and "Can't open disk label package"?

Hello, I'm brand new to Sun/Solaris. I have a Sun Blade 150, with SunOS 5.8. I wanted to make a backup to prevent future data loss, so I put the disk in a normal PC with Windows XP to try to make a backup with Norton Ghost, the disk was detected, but not the file volume, so I place the disk... (6 Replies)
Discussion started by: Resadija
6 Replies

5. Solaris

errors on Netra-440: "IPC Warning: ipc: tcp_protocol: bad magic number"

I was asked to look into a problem with a Sun Netra 440 in another department. On the server in question, the relevant 'uname -a' information is, "SunOS host1 5.9 Generic_118558-16 sun4u sparc SUNW,Netra-440". That information aside, while the other admin is logged into the ALOM, these errors are... (0 Replies)
Discussion started by: Borealis
0 Replies

6. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

7. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

8. UNIX for Advanced & Expert Users

HELP! what does this mean: "svc: bad direction 256, dropping request"

For a few weeks now, on several of our machines, i've been seeing this in /var/log/messages and dmesg: Nov 14 16:37:48 stg2 kernel: svc: bad direction 256, dropping request Nov 14 16:37:48 stg2 kernel: svc: short len 4, dropping request Nov 14 16:38:02 stg2 kernel: svc: bad direction 256,... (2 Replies)
Discussion started by: fishsponge
2 Replies

9. Solaris

Big UH-OH "Bad magic number in disk label"

I tried rebooting my Sun server just a few minutes ago and I got the following at boot: -- Sun Fire 280R (UltraSPARC-III+) , No Keyboard Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.5, 1024 MB memory installed, Serial #xxxxxxxxx Ethernet address... (6 Replies)
Discussion started by: deckard
6 Replies
Login or Register to Ask a Question