07-20-2010
OK, The only problem here is sulog is rotate daily, so I need to search inside these files to get last su login. I was trying to put this code inside su_user's .profile:
Quote:
(date;echo)|xargs >.lastlogin
I dont know if it's better to use /etc/profile instead .profile.
thanks scott
9 More Discussions You Might Find Interesting
1. HP-UX
Hi All,
I have a report which I am running from unix shell script using CONCSUB utility.
Just for testing I put the order number in shell script as ord_low and ord_high.
But Actually what is going to happen is that the order numbers will be in a file say a.txt
and this CONCSUB should... (0 Replies)
Discussion started by: isingh786
0 Replies
2. Shell Programming and Scripting
Hi All,
I have a report which I am running from unix shell script using CONCSUB utility.
Just for testing I put the order number in shell script as ord_low and ord_high.
But Actually what is going to happen is that the order numbers will be in a file say a.txt
and this CONCSUB... (2 Replies)
Discussion started by: isingh786
2 Replies
3. Shell Programming and Scripting
hello
i just want to ask one question
i am willing to create health check of my disk in unix.
like a script should automatically run and genrate output in unix in beautiful report format.
so is there is any way to create a beautiful report in unix like heading should be bold and big in font and... (2 Replies)
Discussion started by: shary
2 Replies
4. Shell Programming and Scripting
Hi i am creating a report with file format csv using sql plus commands under unix environment. I am sending this report using mailx command to excel spread sheet. when i opened the report my columns are merged. I need to manually pull each column to see whole column results. Is there any way in... (0 Replies)
Discussion started by: raosurya
0 Replies
5. Shell Programming and Scripting
Hi All,
Is it possible to have AutoFilter applied in the Excel Sheet which is Exported from UNix server as *.csv file. (0 Replies)
Discussion started by: rawat_me01
0 Replies
6. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Prepare a report discussing from an administration and security perspective, role and function of a JavaScript within a UNIX network. You should illustrate your answer with practical examples. In particular attention should me paid to... (1 Reply)
Discussion started by: afdesignz
1 Replies
7. Shell Programming and Scripting
Hello:
I am trying to build a ksh shell script which would summarize space occupied by "product" directory under /u*/app/oracle
and summarize and report the total size occupied by it in one server.
Environment is this...
HP UNIX 11i
Korn Shell
some thing like ... (1 Reply)
Discussion started by: Sam1974
1 Replies
8. Shell Programming and Scripting
I have some insert in my unix shell script. This every insert has a spool (a file with datas) and a sql file with the query. I have to create a report file with three columns:
The first(TAB_NAME) will contains the name of the table in wich has been done the insert, the second (STATE) will... (7 Replies)
Discussion started by: punticci
7 Replies
9. UNIX for Dummies Questions & Answers
I am trying to write a shell script which dynamically reads all the .sql (oracle sql files) from a particular directory and generates a .csv file in the target directory.
I have started first with the below sample script to see if it is working but I am not able to get it executed, please help... (7 Replies)
Discussion started by: mora
7 Replies
LEARN ABOUT MOJAVE
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)