Hi,
Can we display the Date/time stamp in history command
Ex:
$history
output
-----------
vi pr.sh
ksh -x pr.sh
ksh -n pr.sh
nhoup ksh pr.sh &
nohup ksh pr.sh &
i want the output like this
Tue Mar 14 17:18:57 GMT 2006 vi pr.sh HOSTNAME
is it possible sir ???? (3 Replies)
Hi All.
Suppose I am in a "verylongpath" directory and I type "gedit thisfile".
At a later stage, the command is accessible from the hystory, but it is
useless if I have moved to another directory. The same applies to
"cd myfolder", etc.
Is there a way to instruct shell history to... (1 Reply)
Can anyone tell this:
If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used.
Thanks in advance for your help.
Iamnew2solaris (1 Reply)
hi
i want to show my history command in UNIX solaris ( bash shell ),,
i tried this command ( HISTTIMEFORMAT="%d/%m/%y %T " )
but it's not working with me ,, is there any restricted condition to do this command
any one know why it's not working to me ..
thanks (10 Replies)
HTML Code:
archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (0 Replies)
Discussion started by: rehantayyab82
0 Replies
LEARN ABOUT MOJAVE
tcl_recordandevalobj
Tcl_RecordAndEvalObj(3) Tcl Library Procedures Tcl_RecordAndEvalObj(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_RecordAndEvalObj - save command on history list before evaluating
SYNOPSIS
#include <tcl.h>
int
Tcl_RecordAndEvalObj(interp, cmdPtr, flags)
ARGUMENTS
Tcl_Interp *interp (in) Tcl interpreter in which to evaluate command.
Tcl_Obj *cmdPtr (in) Points to a Tcl object containing a command (or sequence of commands) to execute.
int flags (in) An OR'ed combination of flag bits. TCL_NO_EVAL means record the command but do not evaluate it.
TCL_EVAL_GLOBAL means evaluate the command at global level instead of the current stack level.
_________________________________________________________________DESCRIPTION
Tcl_RecordAndEvalObj is invoked to record a command as an event on the history list and then execute it using Tcl_EvalObjEx (or Tcl_Global-
EvalObj if the TCL_EVAL_GLOBAL bit is set in flags). It returns a completion code such as TCL_OK just like Tcl_EvalObjEx, as well as a
result object containing additional information (a result value or error message) that can be retrieved using Tcl_GetObjResult. If you do
not want the command recorded on the history list then you should invoke Tcl_EvalObjEx instead of Tcl_RecordAndEvalObj. Normally
Tcl_RecordAndEvalObj is only called with top-level commands typed by the user, since the purpose of history is to allow the user to re-
issue recently invoked commands. If the flags argument contains the TCL_NO_EVAL bit then the command is recorded without being evaluated.
SEE ALSO
Tcl_EvalObjEx, Tcl_GetObjResult
KEYWORDS
command, event, execute, history, interpreter, object, record
Tcl 8.0 Tcl_RecordAndEvalObj(3)