05-12-2006
#/usr/bin/csh -f not working as expected?
Hey everyone,
A coworker of mine has written a csh script that starts with #!/usr/bin/csh -f. It's my understanding that the -f should skip the .cshrc and .login files, but here's the problem: In the script "line" is used, and I happen to have a "line" in my ~/bin. When the script is ran my ~/bin is still in the path and the script does not work.
Why is ~/bin in my path if csh was instructed not to load the .cshrc and .login files?
I ran a test by renmaing my ".cshrc" file and logging in. When doing so echo $PATH only gave me "/usr/bin:", so it seems the .cshrc is being used.
Thanks for your help.
P.S. I am on Solaris 5.8.
Last edited by effigy; 05-12-2006 at 03:59 PM..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies
2. Solaris
I have a person running a perl script that is parsing > 2G log files and pipes to cut -d " " -f 1,6,7,8...
The script itself is in a nfs mounted home directory. It runs fine when started from a solaris 8 box but fails after about 400 lines when started from the solaris 10 box. The solaris... (1 Reply)
Discussion started by: wottie
1 Replies
3. Solaris
Hi all,
below is the problem details:
ora10g@CNORACLE1>which ld
/usr/ucb/ld
ora10g@CNORACLE1>cd /usr/ccs/bin
ora10g@CNORACLE1>ln -s /usr/ucb/ld ld
ln: cannot create ld: File exists
ora10g@CNORACLE1>
how to link it to /usr/ccs/bin? (6 Replies)
Discussion started by: SmartAntz
6 Replies
4. Red Hat
hi there,
Would you able to advise that why the syntax or statement below couldn't work as expected ?
/usr/bin/find /backup -name "*tar*" -mtime +2 -exec /bin/rm -f {} \; 1> /dev/null 2>&1
In fact, I was initially located it as in crontab job, but it doesn't work at all. So, I was... (9 Replies)
Discussion started by: rauphelhunter
9 Replies
5. OS X (Apple)
Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself.
But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies
6. Solaris
Hi Experts,
I found that the same commands(sort, du, df, find, grep etc.) exists in both dir.
What is the difference to use them?
i.e: to use xpg4/bin/grep and usr/bin/grep
My OS version is SunOS 5.10
Regards,
Saps (7 Replies)
Discussion started by: saps19
7 Replies
7. Shell Programming and Scripting
Legends,
I am not able to set "expr" function in ksh script.
Below is the sample code i used, and output is as "Syntax error"
Please help me to come out of it.
OUTPUT (9 Replies)
Discussion started by: sdosanjh
9 Replies
8. Shell Programming and Scripting
Hi,
I am trying to do if inside the If in /usr/xpg4/bin/awk. But I am getting below error :
/usr/xpg4/bin/awk -v a="${THREADIDARR
}" 'BEGIN {FS="|"; n=split(a,b," "); for(i=1; i<=n; i++) c]=1;} length($3) == 0{ftag == 1{{print}}; length($3) != 0{$3 in c{ftag=1;print;} !$3 in c{ftag=0;}}'... (4 Replies)
Discussion started by: nes
4 Replies
9. BSD
I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries.
I was trying to compile the latest version of Kanatest from svn. The autorgen.sh script seems to exit without too much trouble:
$ ./autogen.sh
checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies
LEARN ABOUT FREEBSD
adding_user
ADDING_USER(8) BSD System Manager's Manual ADDING_USER(8)
NAME
adding_user -- procedure for adding new users
DESCRIPTION
A new user must choose a login name, which must not already appear in /etc/passwd or /etc/mail/aliases. It must also not begin with the
hyphen '-' character. It is strongly recommended that it be all lower-case, and not contain the dot '.' character, as that tends to confuse
mailers. An account can be added by editing a line into the passwd file; this must be done with the password file locked e.g. by using
chpass(1) or vipw(8).
A new user is given a group and user id. Login and user id's should be unique across the system, and often across a group of systems, since
they are used to control file access. Typically, users working on similar projects will be put in the same groups. At the University of
California, Berkeley, we have groups for system staff, faculty, graduate students, and special groups for large projects.
A skeletal account for a new user ``ernie'' might look like:
ernie::25:30::0:0:Ernie Kovacs,508 Evans Hall,x7925,
642-8202:/a/users/ernie:/bin/csh
For a description of each of these fields, see passwd(5).
It is useful to give new users some help in getting started, supplying them with a few skeletal files such as .profile if they use /bin/sh,
or .cshrc and .login if they use /bin/csh. The directory /usr/share/skel contains skeletal definitions of such files. New users should be
given copies of these files which, for instance, use tset(1) automatically at each login.
FILES
/etc/master.passwd user database
/usr/share/skel skeletal login directory
SEE ALSO
chpass(1), finger(1), passwd(1), aliases(5), passwd(5), adduser(8), pwd_mkdb(8), vipw(8)
BSD
January 30, 2009 BSD