![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find cmd not working as expected | Vishal123 | Shell Programming and Scripting | 6 | 08-29-2007 03:11 AM |
| Var substitution in awk - not working as expected | videsh77 | Shell Programming and Scripting | 3 | 01-13-2006 01:57 PM |
| ls not working as expected within ksh | GNMIKE | Shell Programming and Scripting | 10 | 07-07-2005 08:53 AM |
| awk not working as expected with BIG files ... | videsh77 | Shell Programming and Scripting | 1 | 02-24-2005 04:15 PM |
| which not working as expected | osee | Shell Programming and Scripting | 2 | 09-07-2004 12:37 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
#! /usr/bin/csh -f
works for me on solaris. I created a .cshrc with "echo in .cshrc" and wrote a two line csh script with a similiar echo. Without the -f, I get both echo's. Put the -f back in, I get one echo. You must be invoking the script wrong... see: What does "#! /usr/bin/ksh" mean? |
|
|||||
|
Thanks for the reply, and sorry for the delay: I was on vacation. Here is some more information:
1. There is also a "b" switch, but this shouldn't affect the "f"? ("-fb") 2. The script is called from a third-party application; how it does it, I'm not sure. I imagine this could be a factor, but how can one call a shell script without honoring the switches? Thanks for your help. |
|
|||||
|
Looking again at your first post, you tested that renaming .cshrc had the expected effect while logging in. Which proves nothing at all with respect to the third party script. Why not rename your .cshrc, then try that third party script? It may not be running your .cshrc at all. Maybe your bin directory is already in your PATH. If so, refraining from running your .cshrc again will avoid putting a second copy of your bin directory in your PATH. But that will not magicly remove a copy already there. This is why Bill Joy split out .login from .cshrc. You should not fiddle with your environment every time you run a script.
|
|
|||||
|
I did the following:
1. Renamed my .cshrc. 2. Logged into a new terminal window. 3. Ran the app's .cshrc file. 4. Added /usr/openwin/bin to my path, as required by the script. 5. Ran the shell script via the application. It works as expected; my "line" is not seen. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|