No Such File or Directory when running the script
Hi
I have current script running well in production because there is an additional need so i need to replicated the script and make some changes necessary but the new one doesnt work here is my script a.sc Code:
#! /bin/sh Code:
#!/usr/local/bin/expect -- pollStockData_impl.sc Code:
#! /bin/sh what i did ./a.sc gives me " ": no such file or directory " then i run ./pollStockData.sc gives me " ./pollStockData.sc ": no such file or director " then i tried to run ./pollStockData_impl.sc gives me " bash: ./pollStockData_impl.sc: No such file or directory " what did i do wrong.. i already checked all the permission and it seems okay. Thanks |
Is the current directory in your path?
PATH=.:$PATH |
Hi Thanks for the reply
after i type echo $PATH i get this below Code:
/usr/bin:/usr/ucb:/etc:. |
what directory are you in when you try to run these commands? (type pwd) ..are you in the same directory as the *.sc scripts?
also, change Quote:
Quote:
|
here's another tip... always use full paths in your scripts. You won't get hung up on path issues, you'll save time trying to figure out a old script, and you won't have cronjob issues.
It's a good habit to get into. |
Hi thanks for the reply
but i dont think this is a issue i am in the same directory as .sc script is thats why i can seee the contents by typing cat pollStockData.sc but when i do ./pollStockData.sc it gives no such file or directory i followed ur way /data/opt/psa/rel/ils/files/edi/tpc2/psa2tpcDir/scriptsDir/pollStockData.sc but still same error happens.. any idea guys?? I am trying to use expect to do ftp The thing there is some existing script that is running well in production thats why i confuse all i did is copy and modified some of the things to perform other things |
|
hi, try to run scripts with -x option, like:
Code:
$ sh -x pollStockData_impl.sc |
All times are GMT -5. The time now is 09:58 AM. |