script acting weird..


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script acting weird..
# 1  
Old 03-30-2009
script acting weird..

Hi Guys,

I have this script which is being called from another script,
sh +x SCRIPTNAME.
Now this script is failing saying the source file is missing. But i was able to see the source file was present. It was renamed and but somehow the source file is removed. There is no remove command in the script.

The funnier part is if i just rename the Backup files to orginal name and manually go to the path and call the script SCRIPTNAME, the script runs successfully.

Can anybody help me to understand the issue..

Thanks for ur help in advance,
Magesh
# 2  
Old 03-30-2009
Tools

Without seeing the script and "errors", it is hard to understand or diagnose your problem(s). One thought on issues I have seen before:
(1) different shells being run
(2) different PATH structures being used
(3) file access issues - especially related to group rights
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 acting funny when run from Crontab

Hello, first time here. I have a script that seems to ignore the if statement when run from the cron. I am using Ubuntu 12.10 #!/bin/bash DOWN=/usr/sbin/dcon UP="pon dsl-provider" LOG=/var/log/dsl-reconnect.log RECV=`ifconfig 2>&1|grep ppp0|cut -d , -f 5|cut -d " " -f 1` if ] then... (1 Reply)
Discussion started by: mkoster
1 Replies

2. Shell Programming and Scripting

BASH weird acting: unquoted parameter accepted as quoted one !

In one session I have strange behavior of the bash-shell: SDX-Q> echo ">$ss<" #this is just to present the $ss var: > lll kkk < SDX-Q> # more obviose: SDX-Q> od -cb <<<"$ss" 0000000 l l l k k k \n 040 040 040 154 154 154 040... (3 Replies)
Discussion started by: alex_5161
3 Replies

3. Shell Programming and Scripting

Traceroute script weird output

This script is giving weird output #!/bin/bash NETPATH=(`/bin/traceroute -n 4.2.2.2 | awk '{print $2}'`) for i in "${NETPATH}" do echo $i done The output: to 11.11.11.1 1.1.1.1 99.111.208.2 traceroute_test.sh traceroute_test.sh (7 Replies)
Discussion started by: thumbs
7 Replies

4. AIX

weird korn shell script

here is the one of the scripts: script1.kshfunction haha { print "calling haha" exit } script2.ksh. script1.ksh haha | tee -a /dev/null print "i am script 2" after launching the script2, the result: --------------------------------------------- calling haha i am script 2 ... (6 Replies)
Discussion started by: getter
6 Replies

5. Shell Programming and Scripting

Weird script behaviour !

Hello, I am getting an infinite loop from a script in Linux. Here is the last version of the script in question. As you can see I tried to define everything properly: #!/bin/ksh # Script to loop over a series of dates set -ex typeset -i start_date=20090701 typeset -i... (2 Replies)
Discussion started by: stavros
2 Replies

6. Shell Programming and Scripting

weird script in crontab

Hello here's the first line's of the code that works perfect on command line but not as a crontab job ??? crontab: 15 * * * * /root/scripts/checkclamd_mem.shscript: #!/bin/bash # Checks Memory of the Clamav-daemon and it's .pid file # restarts if over the LIMIT. Starts if pid file not... (3 Replies)
Discussion started by: nls mchn
3 Replies

7. UNIX for Dummies Questions & Answers

Weird Behavior of a Script

ok, there's a script i'm working on written in shell programming. #!/bin/sh this script is written to spit out the contents of certain variables inside of it so the output looks something like this: server01=89 server02=69 server03=89 server04=76 now, when i run this script from the... (4 Replies)
Discussion started by: SkySmart
4 Replies

8. Shell Programming and Scripting

Help with my weird script!

So I have this script titled "testing.sh" #!/bin/ksh #PROGRAM INITIALIZATION HomeDir=/home/sap/gl/ftp server=testftp01 userid=ftp_uatollmsgbus password="f&p53715" MSGLOG=${HomeDir}/msglog.txt FTPLogTmp=${HomeDir}/testing.tmp FTPLogFile=${HomeDir}/testing.log... (1 Reply)
Discussion started by: kdyzsa
1 Replies

9. Shell Programming and Scripting

Why for loop is acting weird

Hey i have a small script in which i check if a file with that pattern exists or not. If present then i go ahead with further processing. In the present situation i have only one file with that name and for loop is reading twice. Here is the script. And the output of debug mode. Please help.... (5 Replies)
Discussion started by: dsravan
5 Replies

10. UNIX for Dummies Questions & Answers

Weird script

I need a script to do the following and have no idea how to do it...can someone help? I need to start Sql*Plus, load a query, say "unmatched.sql", run the query, then load unmatched.sc and run it, then print the output file that unmatched.sc created... any help greatly appreciated. Duckman (2 Replies)
Discussion started by: Duckman
2 Replies
Login or Register to Ask a Question