Shell Scripting Error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell Scripting Error
# 1  
Old 06-13-2008
Bug Shell Scripting Error

When i run the script firecall.sh,i am getting a weird error.


Code:
[!]root: ./var/ADMIN/bin/firecall.sh d12381
./var/ADMIN/bin/firecall.sh: ?osrc: command not found
./var/ADMIN/bin/firecall.sh: ?osrc: command not found

The script is successful,but the error interests me...Any Ideas??


The script is appended below.
[!]root: cat firecall.sh
#This script locks the User Account specified after 2 hrs.Remember to provide the D-id to be locked as the Input Variable after the Script name in the command prompt.

#Command to Lock the User Account after 60 sec.
(sleep 60 ;passwd -l $1) &
exit

Last edited by Yogesh Sawant; 06-13-2008 at 05:44 AM.. Reason: added code tags
# 2  
Old 06-14-2008
Try to run the script without the initial dot (.).

Also cat the script without the initial dot.

What happens in these two cases?

What kind of system are you on? Linux? In that case, you're running bash. Do you have a /root/.bashrc? How about /etc/profile? What does it look like?

Your shell is sourcing a file that has an error in it, I believe. Or you're not running the firecall.sh that you think you are. Probably it's the first option, however...
-mschwage
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell scripting syntax error in if then else

I have one bash shell script to execute table refreshment. At the bottom of script, I have one piece of code to check 'ORA-' error from log file, then send email to DBA or application people. But this piece of code didn't work. I tried different ways and also search online to find where is my... (2 Replies)
Discussion started by: duke0001
2 Replies

2. Shell Programming and Scripting

Error in tsch shell scripting..

Hi Everyone, I am using gdb-7.5 to connect to the target. When I gave the./configure --target=xyz --build=i686-pc-mingw32 --host=i686-pc-mingw32 command then checking build system type... i686-pc-mingw32 checking host system type... i686-pc-mingw32 checking target system type... xyz-mingw32... (3 Replies)
Discussion started by: Heeka
3 Replies

3. Shell Programming and Scripting

Shell Scripting Error - help

I am trying to do an upgrade on a VMWare appliance. I am getting an error, and I dug into the script that is causing the error and will post the statement that is causing the error. Basically, my software seems to want an additional partition before it will do the upgrade. So, I added a new... (1 Reply)
Discussion started by: Phoenix Askevic
1 Replies

4. Shell Programming and Scripting

ERROR in executing mysql querys in shell scripting

Hi All, Please see the below script for mysql 3 commands. Its giving me the right output for all three commands but showing some errors in first two commands , i guess there might be an issue with date. Can anyone help me . #! /bin/bash TABLE_NAME=testingddatabase USER_NAME=root... (3 Replies)
Discussion started by: aish11
3 Replies

5. Shell Programming and Scripting

shell scripting error help

Im tryign to write a script that counts the number of new lines in the file with the most new lines in a given directory i keep getting this error /export/home/sieben01/itec400/homework> ./maxlines.sh ./maxlines.sh: syntax error: `then' unexpected operator/operand any ideas? ... (11 Replies)
Discussion started by: livewire06
11 Replies

6. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

7. Shell Programming and Scripting

Error handling in Unix shell scripting

Hello, I have written a shell script and suppose there is any error in the script. How i can do exception handling in shell script.for example i have below code sqlplus -s <<uid>>/<<pwd>>@<<$ORACLE_SID>> <<EOF > 1_pid1.log set pagesize 0 set feedback off set heading off set linesize 200... (1 Reply)
Discussion started by: rksingh003
1 Replies

8. Shell Programming and Scripting

bash shell scripting error need help urgently

#! /bin/sh abcd = "Hello world" if then echo $abcd fi i got error message that line3 : abcd: command not found line5 : [0: command not found line5 : [1: command not found i have no idea why i got this message. Can some one help me ??? (6 Replies)
Discussion started by: bonosungho
6 Replies

9. Shell Programming and Scripting

shell scripting error

i am trying to work on a simple shell script as #!/bin/bash filename = $2 if ; then echo " Displaying the Content of the file:" filename = $2 cat filename else if ; then echo "Displaying directory listing:" ls -l filename else echo " Commands not correct:" fi done it shows the... (3 Replies)
Discussion started by: phone_book
3 Replies

10. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
Login or Register to Ask a Question