|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Script doesn't run
Hi everyone,
I've written a script, I gave it permission by > chmod u+x myscript and then tried to run it with > myscript and it didn't work, so I've written > ./myscript again, it didn't work, so I've written > set path = (. $path) but it didn't work as well. I have some experience with unix and cshell (the script I wrote is a cshell one), and those are the only solutions I know for tracking a script in a path. If you have any idea, I would love to hear it. Thanks so much and happy holidays, Shira. ![]() |
| Sponsored Links | ||
|
|
|
#2
|
|||
|
|||
|
When you say did not run, what message did you get? You say you've written a csh script, which I assume is not the same as your interactive shell? Did you set the shebang correctly on the first line of your script. e.g.: Code:
#!/bin/csh Did you verify that csh exists at that location? Last edited by Scrutinizer; 12-26-2009 at 05:27 PM.. |
|
#3
|
||||
|
||||
|
Of course, I've written many scripts in this environment.
I'm using a different computer now, and I know that it doesn't mean anything, but if it helps, the previous computer had windows xp os and now I have vista. Again, it doesn't mean anything, but perhaps it's a vital information. And yes, I've written in the beginning of the script #!/usr/local/bin/tcsh -f When I try to run it, it says: myscript: Command not found Thanks, Shira. |
|
#4
|
|||
|
|||
|
Please show the output of Code:
which tcsh |
|
#5
|
||||
|
||||
|
the output is:
/bin/tcsh thanks, Shira. |
|
#6
|
|||
|
|||
|
Then you should change the first line of your script to Code:
#!/bin/tcsh -f |
|
#7
|
||||
|
||||
|
Hi Jim!
Now I see what you mean. I changed the opening of my script to just #!/bin/tcsh -f and now it works. I had it in mind, but I've never thought it was the reason. I guess it was because I changed my computer. Thanks so much, Shira. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl script 'system' linking to local shell script not working | phpfreak | Shell Programming and Scripting | 5 | 10-16-2009 04:56 AM |
| (Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script | praka | Shell Programming and Scripting | 6 | 04-15-2009 06:09 AM |
| need inputs on how i can change my script to reduce amount of time the script takes | madhul2002 | Shell Programming and Scripting | 1 | 04-01-2009 07:40 PM |
| create a shell script that calls another script and and an awk script | magikminox | Shell Programming and Scripting | 0 | 06-26-2008 02:50 AM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 03:06 AM |