Sponsored Content
Full Discussion: .sh_history file
Top Forums UNIX for Advanced & Expert Users .sh_history file Post 35346 by Kelam_Magnus on Tuesday 8th of April 2003 11:13:23 AM
Old 04-08-2003
Add this to the .profile in question. It is what my company uses for those who have root access.
Code:
#############
# sets .sh_hist file to id of user
if [ "`tty`" = "/dev/console" ]
then
        REAL=console
else
        REAL=`logname`
fi

HISTFILE=$HOME/.sh_$REAL
export HISTFILE
HISTSIZE=1000; export HISTSIZE

i think that is all the code. Each time a different person logs in, this will create a .sh_user1 history file.

added code tags for readability --oombera

Last edited by oombera; 02-20-2004 at 05:04 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to create .sh_history file

Thanks PxT answered my "compare two files"question very quick and neat!!:-) I have a question about .history file I couldn't find any satisfied answer from book. 1. This file was created automatically when you set up user's environment or you have to use a command to create it or you... (4 Replies)
Discussion started by: b5fnpct
4 Replies

2. UNIX for Dummies Questions & Answers

.sh_history contains the list of past commands

hi, .sh_history keeps a list of past commands that we entered. but it has a limit and where do we set this limit. thanks. (1 Reply)
Discussion started by: yls177
1 Replies

3. UNIX for Dummies Questions & Answers

Clarification on .cshrc,.exrc,.login,.profile,.sh_history files

All, I had a request to delete filed under a directory that was 35 days old . And they asked me to scedule it in CRON . I have done that . I have use find and delete with mtime to perfrom this task . But my script is not deleting this .cshrc,.exrc,.login,.profile,.sh_history file... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

4. AIX

history .sh_history sh_history

hi what's the difference between .sh_history and sh_history for root user? thanks itik (1 Reply)
Discussion started by: itik
1 Replies

5. AIX

timestamp in .sh_history using ksh shell

Hello Everyone: Does anyone know how I will setup my account to put timestamp in my .sh_history? I do not hold the root account. I am using AIX 5 and ksh shell. I tried every solution I can find in the internet but nothing seems to work OR I am just applying those in the wrong way. Anyone knows... (4 Replies)
Discussion started by: Orbix
4 Replies

6. UNIX for Advanced & Expert Users

Incoherence between finger and .sh_history

Hello, I've a script that verifies users connections. This is the check part do NEVER=$(finger $USER | grep -i Never) if then NAME=$(finger $USER | grep -i "In real life" | sed -e 's/^.*life: //') echo $USER $NAME >> never_logged #" "$NEVER fi done that for a specific... (6 Replies)
Discussion started by: gogol_bordello
6 Replies

7. AIX

Looking at .sh_history file.

I reviewed a couple old post where shockneck posted the use of the EXTENDED_HISTORY=ON variable to place a timestamp in the .sh_history file when using ksh and using the fc -t command to read the .sh_history file. The fc command reads my history file. As an admin I would like to be able to read... (5 Replies)
Discussion started by: juredd1
5 Replies

8. UNIX for Advanced & Expert Users

sh_history file

Hi, I'm on a linux machine. But I see that sh_history is not updated since february 15. How is it possible ? Thank you. uname -a Linux MYSERVER 2.6.18-194.11.3.el5PAE #1 SMP Mon Aug 23 15:57:10 EDT 2010 i686 i686 i386 GNU/Linux ls -al -rw------- 1 oracle dba 3644 fév 15 09:28... (10 Replies)
Discussion started by: big123456
10 Replies

9. AIX

Problem in Emailing all .sh_history entries

Hi, I can't get all the enties of AIX .sh_history in email. only first entry of the history is emailed after executing the below code. mail -s "History `date +%d-%m-%Y`" myemail@xyz.com <$HOME/.sh_history Can anyone help? (3 Replies)
Discussion started by: m_raheelahmed
3 Replies

10. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
slasq4.f(3)							      LAPACK							       slasq4.f(3)

NAME
slasq4.f - SYNOPSIS
Functions/Subroutines subroutine slasq4 (I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, DN1, DN2, TAU, TTYPE, G) SLASQ4 Function/Subroutine Documentation subroutine slasq4 (integerI0, integerN0, real, dimension( * )Z, integerPP, integerN0IN, realDMIN, realDMIN1, realDMIN2, realDN, realDN1, realDN2, realTAU, integerTTYPE, realG) SLASQ4 Purpose: SLASQ4 computes an approximation TAU to the smallest eigenvalue using values of d from the previous transform. Parameters: I0 I0 is INTEGER First index. N0 N0 is INTEGER Last index. Z Z is REAL array, dimension ( 4*N ) Z holds the qd array. PP PP is INTEGER PP=0 for ping, PP=1 for pong. N0IN N0IN is INTEGER The value of N0 at start of EIGTEST. DMIN DMIN is REAL Minimum value of d. DMIN1 DMIN1 is REAL Minimum value of d, excluding D( N0 ). DMIN2 DMIN2 is REAL Minimum value of d, excluding D( N0 ) and D( N0-1 ). DN DN is REAL d(N) DN1 DN1 is REAL d(N-1) DN2 DN2 is REAL d(N-2) TAU TAU is REAL This is the shift. TTYPE TTYPE is INTEGER Shift type. G G is REAL G is passed as an argument in order to save its value between calls to SLASQ4. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Further Details: CNST1 = 9/16 Definition at line 151 of file slasq4.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 slasq4.f(3)
All times are GMT -4. The time now is 01:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy