Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

profile(4) [hpux man page]

profile(4)						     Kernel Interfaces Manual							profile(4)

NAME
profile - set up user's environment at login time DESCRIPTION
If the file exists, it is executed by the shell for every user who logs in. The file should be set up to do only those things that are desirable for every user on the system, or to set reasonable defaults. If a user's login (home) directory contains a file named that file is executed (via the shell's before the session begins. files are useful for setting various environment parameters, setting terminal modes, or overriding some or all of the results of executing EXAMPLES
The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 22 # Tell me when new mail comes in MAIL=/var/mail/myname # Add my /bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type echo "terminal: c" read TERM case $TERM in 300) stty cr2 nl0 tabs; tabs;; 300s) stty cr2 nl0 tabs; tabs;; 450) stty cr2 nl0 tabs; tabs;; hp) stty cr0 nl0 tabs; tabs;; 745|735) stty cr1 nl] -tabs; TERM=745;; 43) stty cr1 nl0 -tabs;; *) echo "$TERM unknown";; esac A more complete model can be found in FILES
SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), su(1), environ(5), term(5). profile(4)

Check Out this Related Man Page

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.11 20 Dec 1992 profile(4)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Setting LIBPATH in profile

Hi there, I wonder if anyone can help me. I run an application on an AIX 4.3.3 machine, for which I need to set up the LIBPATH environment variable for a specific user. I need this to be set up automatically when the user logs in (via Exceed), so I tried setting this in the .profile file. ... (7 Replies)
Discussion started by: durnelln
7 Replies

2. Shell Programming and Scripting

stty: : No such device or address

I encoutered the error "stty: : No such device or address" in the korn shell script log. I added STTY EARSE ^H in profile. why iam i getting that error in Korn shell Thanks nandinisagar (6 Replies)
Discussion started by: nandinisagar
6 Replies

3. Shell Programming and Scripting

Append tabs at the end of each line in NAWK -- varying fields

Hi, I need some help in knowing how I can append tabs at the end of each line... The data looks something like this: field1, field2, field3, field4 1 2 3 4 5 I have values in field1 and field 2 in the first row and I would like to append tab on field3 and field4 for the first row..and in... (6 Replies)
Discussion started by: madhunk
6 Replies

4. Shell Programming and Scripting

Need a help in the Shell script which is erroring out

Hi all I want to add this line after a line This is the line which needs to be add after the word permission echo 'profile: /export/home/unix1/auto.pr' >> $xxyy if ;then cd $unixserv/unix sed ' /permission/ a\ echo 'profile: /export/home/unix1/auto.pr' >> $xxyy... (13 Replies)
Discussion started by: ranga27
13 Replies

5. Shell Programming and Scripting

If condition

here is my script ######## #! /bin/sh export PATH=$PATH:/opt/mysql/bin/ #echo $PATH echo $LD_LIBRARY_PATH USER="root" PASS="xyz" DB="sme" DATE=$(date +%d%b%y_%k.%M.%S) #DATE=`date +%y-%d-%m` if mysqldump -u $USER -p$PASS $DB | gzip -9>/home/backup1/today_sme-$DATE.sql.gz then find... (10 Replies)
Discussion started by: kaushik02018
10 Replies

6. Shell Programming and Scripting

.kshrc is not executing

Hi, I am facing two problems in my environment. Anyone can help on this? Thanks in advance. Problem 1 --------- When i login into my new unix system, only the .profile is executing. .kshrc is not executing. But my default shell is .ksh Any setup to be changed ? Problem 2... (7 Replies)
Discussion started by: senthil_is
7 Replies

7. Shell Programming and Scripting

Find command with MKS Toolkit

Hi All, I want to use the find command with MKS Toolkit. I am using the below syntax, find.exe . "pattern" -print > tmp.txt This command is working fine in Unix, but not in MKSToolkit. But it is exiting with 1. Can any one help me how to use the find command with MKS Toolkit. Thanks for your... (7 Replies)
Discussion started by: Radhika.Jakkula
7 Replies

8. Shell Programming and Scripting

How to use -path and -prune with find

OK, I'm trying search and destroy tabs again. This time I'm having trouble excluding certain directories from my search. Here is what I have tried and it is not ignoring the top level build directory: find . -path ./build -prune -name \*.java -o -print | xargs grep -i ' ' I don't... (6 Replies)
Discussion started by: siegfried
6 Replies

9. Shell Programming and Scripting

Works in shell but not script UNIX

ok i have a very simple UNIX script #!/bin/bash TERM=ansi;export TERM PFCMARK=25;export PFCMARK umask 0000 PFUMASK=000;export PFUMASK #run for filepro menus and exectuables echo "###########File Modification Log.############\r" > "/public/appl-fp$(date +%m-%d-%Y).txt" find /appl/fp/... (10 Replies)
Discussion started by: dunpealslyr
10 Replies

10. AIX

Stty settings before login

Hello. I'm experiencing a frustrating issue. I'm using an old, unsupported terminal client (QVT) with AIX 6.1 using ssh2. I've come up with some stty settings that allow full usage of the system but to do so I've had to set "igncr". While this works fine once the user is logged in there are... (12 Replies)
Discussion started by: RedCabbage
12 Replies

11. OS X (Apple)

PATH in OS X

When I "echo $PATH" in terminal, I can see the PATH information. And if I use export command to add a new path into $PATH, it also works. I was just wondering, is there any file in MAC OS X, which include this $PATH variable? I mean we have to store $PATH in some place... Anyone knows, pls... (6 Replies)
Discussion started by: andrewust
6 Replies

12. Shell Programming and Scripting

How to get name for a tar file from user

Hi guys, I'm new to this forum.Infact this is my first post.So please bare with me ;). I have made sh script that makes tar file with few files after they are modded.Now I have given a default name to the tar but I want the users to specify the name for the tar before the script makes the tar.... (9 Replies)
Discussion started by: vijai
9 Replies

13. Shell Programming and Scripting

awk print values between consecutive lines

I have a file in below format: file01.txt TERM TERM TERM ABC 12315 68.53 12042013 165144 ABC 12315 62.12 12042013 165145 ABC 12315 122.36 12052013 165146 ABC 12315 582.18 12052013 165147 ABC 12316 2.36 12052013 165141 ABC 12316 ... (8 Replies)
Discussion started by: alex2005
8 Replies

14. Shell Programming and Scripting

Use stty columns 140 in .profile on ksh

Hi, I am trying to put stty columns 140 in .profile to set column width to 140 so I don't have to manully do it every time. My main goal is to avoid seeing "Terminal too wide" message whenever I try to use vi editor in full screen. I am on korn shell echo $SHELL /bin/ksh So even... (8 Replies)
Discussion started by: pat_pramod
8 Replies

15. Emergency UNIX and Linux Support

Dealing with XLS file with multiple tabs

Hey Guys , Recently working on a requirement , i had to deal with XLS file with multiple tabs and the requirement was as below : 1. Convert one XLS file with multiple tabs to multiple CSV files. -- As i was working on MAC , so it was quite easy through APPLESCRIPT to deal with this.But... (6 Replies)
Discussion started by: himanshu sood
6 Replies