I find that having this in my .bashrc gives me exactly the behavior I expect (namely, any time I press Enter in a terminal, the shell's idea of the history matches exactly what is in my HISTFILE--no more, no less):
OK, i might be a bit slow but now i get what you want. If this is what you want you can have that in ksh too. There is no PROMPT_COMMAND variable in ksh but the shell prompt itself is capable of executing commands:
Notice that editing the commad history needs the variable HISTEDIT (in ksh93) or FCEDIT (in ksh88) to be set to your preferred editor, otherwise you end up in ed. The history comamnd in ksh is hist, which by default is aliased to fc and r (for "repeat"). You can search and replace when repeating commands like this:
which will re-run the last command line starting with "x" but the instances of "old" replaced with "new".
hello everyone!
Very basic question for the guru's in here but anyways, I am trying to type a command that is longer than the line. What character do I use to continue my command on the next line?
Thanks in advance....
Todd (1 Reply)
Hi Guys,
Our user crontab files are located at /var/spool/cron/crontabs.
I have to make some modifications to it.
I have all the crontab entries in a file called 'crontab.actual'. I made changes to this file and now I want to reload these changes from the crontab.actual file to my crontab... (12 Replies)
What is the command for checking modification history on file?
---------- Post updated at 01:20 PM ---------- Previous update was at 12:35 PM ----------
Let me rephrase this. On a regular Unix file can I at least check to see the time and date history modification of the file? (6 Replies)
Hi,
What is the korn shell equivalent of bash shell's "history -c" command?
I do know, how to clear the history list in ksh, I can do the following:
> ~/.sh_historybut still, I am interested to know the single one line command as 'history -c' gives error on my ksh (1 Reply)
Hi all,
I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle.
I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
I just created a CNAME and i was told a zone needs to be reloaded after creating a CNAME. What is the command to reload a zone after the CNAME has been created?
Thanks in advance (1 Reply)
Hello :)
I'm a newb when it comes to shell scripting and was wondering about a command(s) for a script that could be used to checkout a certain number of version/revision histories of a file. I know for the latest revison you "co filename" or for a certain revision number "co -r*.* filename"... (2 Replies)
Hello,
The system has been rebooted and I need to see the commands executed in the system prior to restart by the oracle user.The history command is not showing me the commands executed prior to reboot.
Please advise.
Best regards,
Vishal (1 Reply)
I am making a bash script right now and am running into an issue. As I am new to scripting, I do not know exactly what to do to get what I'm looking for in my script.
Essentially, my script will automatically input VRFY common names after nc
Example:
nc 192.168.248.133 25
VRFY Allison... (2 Replies)
Discussion started by: ksrhayward
2 Replies
LEARN ABOUT MOJAVE
tklib_history
history(n) Provides a history for Entry widgets history(n)
__________________________________________________________________________________________________________________________________________________NAME
history - Provides a history for Entry widgets
SYNOPSIS
package require Tcl 8.4
package require Tk 8.4
package require history ?0.1?
::history::init pathName ?length?
::history::remove pathName
::history::add pathName text
::history::get pathName
::history::clear pathName
::history::configure pathName option ?value?
bell
_________________________________________________________________DESCRIPTION
This package provides a convenient history mechanism for Entry widgets. The history may be accessed with the up and down arrow keys.
::history::init pathName ?length?
Arranges to remember the history of the named Entry widget. An optional length determines the number of history entries to keep.
This may be changed later with ::history::configure. History entries must be added with the ::history::add command before they can
be seen.
::history::remove pathName
Forgets all history entries for the Entry pathName and removes the history bindings.
::history::add pathName text
This command is used to add history entries to an Entry that has previously had ::history::init called on it. This command should be
called from your Entry handler with the contents of the entry (or whatever you wish to add to the history).
::history::get pathName
This command returns a list containing the history entries for the Entry pathName
::history::clear pathName
This command clears the history list for the named Entry.
::history::configure pathName option ?value?
This command queries or sets configuration options. Currently the options recognized are length and alert. Setting the length deter-
mines the number of history entries to keep for the named Entry. Alert specifies the command to run when the user reaches the end of
the history, it defaults to
bell
entry .e
bind .e <Return> [list ProcessEntry %W]
::history::init .e
pack .e
proc ProcessEntry {w} {
set text [$w get]
if {$text == ""} { return }
::history::add $w $text
puts $text
$w delete 0 end
}
KEYWORDS
entry, history
history 0.1 history(n)