Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'A subtle fix for hard-to-diagnose installer hangs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A subtle fix for hard-to-diagnose installer hangs
Authored by: liz4cps on Jul 25, '05 07:16:36PM

Actually, if you write a csh shell script, you should include the -f flag in the first line of the script:

#/bin/csh -f

This -f is for fast and tells csh to ignore any .cshrc file. That was SOP back in the day. I thought it would be still, but various things have been lost over the years...

The .login is not equivalent as it is only read in at login and is/was inteneded for environmental variables (eg to set the TERM and the speed of the connection (to the computer from your terminal!), etc). If you start up another shell (eg in another window, etc), it would not get aliases from the .login but would inherit the environment. So, the .cshrc was read in whenever a shell was started -- which used to happen if you just put a command in parens -- eg "bar | (cd ...; foo)". It looks like MacOS does treats each new window as a login shell though. It seems quite odd to me... Maybe now the .login is nearly equivalent.

- Liz

PS I did have that alias for "rm". I've changed it to "del" but that'll be hard for me to remember -- I've been using "rm" since 1979!

[ Reply to This | # ]
A subtle fix for hard-to-diagnose installer hangs
Authored by: liz4cps on Jul 25, '05 07:21:13PM

I had a typo in the last one; sorry. That first line should have an ! in it:

#!/bin/csh -f

- Liz

[ Reply to This | # ]
overriding aliases
Authored by: sjk on Jul 29, '05 04:06:36PM

But remember you can override your "rm" alias by prepending '\' (backslash) to it. :-)

And, depending on the flavor of Unix and/or command, adding "-f" after an alias with "-i" can override its interactivity.

Personally, I prefer using cp/mv/rm with "-i" by default (e.g. with shell aliases) and overriding it when desired. With "rm", I'd rather be prompted to delete the first of many files, interrupt the command, recall it (e.g. ctrl-P), slap a backslash in front of it, and redo it than be the unwilling victim of an overzealous wildcard. An occasional, brief "do you really want to do that?" pause has been a worthwhile rethink-and-redo safety net for me although some people will be annoyed by it. And I've never wanted to remember to use interactive versions for those commands. YMMV. :-)

[ Reply to This | # ]