Error-- : " bad string"


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Error-- : " bad string"
# 1  
Old 04-01-2009
Error-- : " bad string"

Hi All,

wen i am running a script . its giveing the below error and hanging there

Bad string

*******************

Please enter the following details one by one
---------------------------------------------
First name : Sanjay
Last name : Acharya
SSO : 501224845
Case Number : H033109_5417426

############## Choice of Type of User ID ################

1. Normal User ID
2. Batch User ID
Please Enter the Choice : 1
Checking any ID existing with the entered SSO(501224845)
--------------------------------------------------------
Bad string


Although on all other servers its working fine.
Thanx in Advance
# 2  
Old 04-02-2009

Please post the script that is giving you problems.
# 3  
Old 04-02-2009
Thanks cfajohnson.

actually script is very long ( 1500 lines) .
actualy its working fine on all others servers (55 servers).

I am not getting the root cause of not working of it.

as te servre is also solaris 10. E25 K.

please let me know if you get something on it.
# 4  
Old 04-02-2009
Quote:
Originally Posted by manoj_dahiya22
actually script is very long ( 1500 lines) .
actualy its working fine on all others servers (55 servers).

I am not getting the root cause of not working of it.

as te servre is also solaris 10. E25 K.

please let me know if you get something on it.

On Solaris, there's a good chance that the script requires a POSIX shell, but is running /bin/sh, which is not a standard shell on Solaris. Try running it with /usr/xpg4/bin/sh instead.

If that doesn't help, post an extract of the script that displays the problem.
# 5  
Old 04-02-2009
Thanks sir.
with this shell, did not get that error. But getting beow error

./createid.sh[103]: userid=${fname:0:1}${lname:0:7}: bad substitution

fname : its taking first letter of first name
lname : its taking 7 letters of last name
# 6  
Old 04-02-2009
this looks like a /usr/bin/bash
# 7  
Old 04-02-2009
Hi vgersh99,

Yep . This syntax works fine in /bin/bash
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies

2. Shell Programming and Scripting

grep with "[" and "]" and "dot" within the search string

Hello. Following recommendations for one of my threads, this is working perfectly : #!/bin/bash CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" ) Now I need a grep success for some thing like : #!/bin/bash CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies

3. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

4. Red Hat

/var/log/messages error "kernel: RPC: bad TCP reclen"

Hi, I am seeing the following errors in my environment, not sure why is it happening, any ideas? Thanks. kernel: RPC: bad TCP reclen 0x73746174 (non-terminal ) Dec 17 02:14:48 kernel: RPC: bad TCP reclen 0x63480000 (large) Dec 17 02:14:48 kernel: RPC: bad TCP reclen 0x633f0000 (large) Dec... (5 Replies)
Discussion started by: amarlinux
5 Replies

5. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

6. Shell Programming and Scripting

Using sed to find text between a "string " and character ","

Hello everyone Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies

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

8. Shell Programming and Scripting

input string="3MMTQSZ348GGMZRQWMJM4SD6M";output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6

input string="3MMTQSZ348GGMZRQWMJM4SD6M" output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6M" using linux shell script (4 Replies)
Discussion started by: pankajd
4 Replies

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

10. Shell Programming and Scripting

Error "Cat Error: Bad Address "

Hi I get an Error when i am trying to edit a file thru shell script. ERROR IS "cat: write error: Bad address." I don't get this error everytime i run the shell script. Any idea ?? Here is the piece of code: echo "Attempting to edit ${ProbeRuleFile}" if then cp... (1 Reply)
Discussion started by: ss_hpov
1 Replies
Login or Register to Ask a Question