07-09-2013
if you are using
csh, set the PATH variable in
$HOME/.cshrc or
$HOME/.login ...
when you login as root either through
su - or directly on the console, you will get the environment set by
$HOME/.profile and/or
/etc/profile because root's default shell is
sh ...
however -- when you change your shell to
csh -- the environment set is based on the default PATH (see
man csh) if
$HOME/.cshrc or
$HOME/.login does not exist ...
setting csh path
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello
i use bash and i added a path variable for 2 files /rscr and /uscr in /etc/profile
/rscr working fine but the other one shows command not found
and when i try to type whereis for scripts in /rscr it shows them but the other one shows nothing... thanks :b: (3 Replies)
Discussion started by: wir3d
3 Replies
2. Shell Programming and Scripting
Hello All,
I am somehow stumped with this ting.
'Find' will sure show me.. but I want only thepath of all the occurences of the file in any of the sub-dirs..
Any help will be sincerely appreciated.
thanx! (3 Replies)
Discussion started by: pranavagarwal
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Iam new to UNIX...My requirement is to create 3 dir as an hierarchy under /var/opt/temip.The output should be /var/opt/temip/GP_Int/GPTTS/AUTO.
I have tried the following script...But only GP_int folder is getting created and not other folders...Can someone help???
#!/usr/bin/ksh
#script... (1 Reply)
Discussion started by: Llb
1 Replies
4. Shell Programming and Scripting
Hi All,
My UNIX Version is:
OS Name Release Version
AIX appma538 3 5
I want to find certain files with some criterias under the given path. At the same time i want to find the files which resides under the given directory, but normal find traverse to its sub-directories... (4 Replies)
Discussion started by: Arunprasad
4 Replies
5. Programming
Hi.
im learning unix, and i have problem with my shell . i want to add hierarchical directories. so theshell have mkdir, rmdir and chdir commands.
the coding in C language.
i looked at the source of mkdir for example, and its very long and complicated. i need simple implementation... (9 Replies)
Discussion started by: evantheking
9 Replies
6. Shell Programming and Scripting
Hi,
I want to get ABC and 924 from this path. How can i do so?
The length of the path can vary from but end will we same.
/home/abs/cad/bad_BAD/vdhingra/testcases/ABC/924/work
Similarly, CBA and 234 from this path.
/home/abs/cad/aaa/bad_BAD/vdhingra/testcases/CBA/234/work (5 Replies)
Discussion started by: vdhingra123
5 Replies
7. Shell Programming and Scripting
Hi,
I want to grep a word say "fan" from a file and redirect those lines in a file with "#" before them.
eg
all
fan is on
i am you
you are me
i am on fan
Expected o/p
#fan is on
#i am on fan (2 Replies)
Discussion started by: vdhingra123
2 Replies
8. Shell Programming and Scripting
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies
9. Shell Programming and Scripting
Hi guys :)
First of all Happy New Year :)
so i dont know if my doubt its already here posted by other person ...
i need to print to one file the path of few files that are in different directories, like this:
directory muscle
ATP6.aa.muscle.fasta
COX1.aa.muscle.fasta
.
.
.
... (2 Replies)
Discussion started by: andreia
2 Replies
10. Shell Programming and Scripting
Hi there,
I have the following in my path:
export PATH=/usr/bin:/usr/sbin
But I want to change it programmatically(for the purpose of JBoss automatic(ansible) installs) to:
export PATH=/usr/bin:/usr/sbin:/usr/jdk/jdk1.8.0_60
and after that I need to insert the JAVA_HOME programmatically,... (7 Replies)
Discussion started by: hvdalsen
7 Replies
LEARN ABOUT SUNOS
profile
profile(4) File Formats profile(4)
NAME
profile - setting up an environment for user at login time
SYNOPSIS
/etc/profile
$HOME/.profile
DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence.
/etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement
of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special
actions for the root login or the su command.
The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical
(except for the comments):
# Make some environment variables global
export MAIL PATH TERM
# Set file creation mask
umask 022
# Tell me when new mail comes in
MAIL=/var/mail/$LOGNAME
# Add my /usr/usr/bin directory to the shell search sequence
PATH=$PATH:$HOME/bin
# Set terminal type
TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid
while :
do
if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ]
then break
elif [ -f /usr/share/lib/terminfo/?/$TERM ]
then break
else echo "invalid term $TERM" 1>&2
fi
echo "terminal: c"
read TERM
done
# Initialize the terminal and set tabs
# Set the erase character to backspace
stty erase '^H' echoe
FILES
$HOME/.profile user-specific environment
/etc/profile system-wide environment
SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5)
Solaris Advanced User's Guide
NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most
global needs.
SunOS 5.10 20 Dec 1992 profile(4)