There are two type of startup-files:
- user depending in home-dir of user (e.g. $HOME/.profile)
- system-wide (valid for all users) (e.g. /etc/profile)
user depending login-startup files (like .login, .profile) are stored in the users home directory.
Also user root has defined a home dir (usually /):
In which login-startup file you add the setting of the environment variable is very much depending on the login shell your user is using.
In the above example, root is using /sbin/sh as login shell.
For the bourne-shell (sh) the correct login-startup file is /.profile if only user root should use this file for startup or /etc/profile if all users should use this startup file.
I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them)
Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
I have a simple csh-script on a Solaris Workstaion which invokes the bc calculator:
#!/bin/csh
set shz=2
set zshift=5
set shzp=`bc -l <<END \
scale = 3 \
-1. * $shz + $zshift \
END`
echo $shzp
The result ($shzp) in this case is 3 (-1*2+5). It works fine on Solaris 8.
... (2 Replies)
Hi folks
There are about 200 csh scripts (I didn't wrote them). Do all those scripts run with tcsh without modification? Is tcsh 100% compatible with the plain-old csh?
$ which csh
/usr/bin/csh
$ which tcsh
/usr/bin/tcsh
$ uname -a
SunOS purzelse 5.9 Generic_117171-07 sun4u sparc... (2 Replies)
I am using this code
echo "opt_tpath = $opt_tpath"
if ($opt_tpath == 1) echo " -tpath = $Atpath\n"
and is giving
opt_tpath = 0
Atpath: Undefined variable.
Atpath should only be printed in opt_tpath == 1 but it still tries to print.
---------- Post updated at 10:05 AM ----------... (1 Reply)
I am trying to use \n for a new line in csh like this
echo "some text\n"
echo "some more text\n"
but am getting
some text\n
some more text\n (10 Replies)
Hey all,
I've only just started using UNIX coding on my Masters project, so am still learning!! The script I've been writing is literally just for me to get used to writing it and seeing what I can do with some data I've been given.
I'm trying to write a script, where the penultimate line... (2 Replies)
Hi All,
Could any one of you give me a hand to convert the following line of codes from .sh to .csh please ?
proc_id=`fuser /tmp/test`
if
then
echo "File is not being used by any thing"
fi
if
then
echo "File is being used... please wait"
sleep 1
fi
Regards. (1 Reply)
CSH experts
What does the following do in CSH?
:(){:|:&};:
I was asked the question, but I don't know. I'm not aware of the context.
Any ideas?
Thanks! (1 Reply)
Dear Solaris Experts,
I would like to set the lowest priority when running a resource intensive program in C shell on Solaris 10 similar to the following syntax that works in Korn shell:
$ nice -n 19 programHowever, I got the following error when running the same command in C shell:
9 ... (3 Replies)