| Click Link Linux with Notebooks | Linux portable linux with laptops , notebooks pda's mobile phones and other portable devices | Click Link Linux Start | Internet Security , Linux porting guide , block forward ports - Linux manage guide network administrator Online manual security | Click Link Linux Install Manual | Install guide - How to install linux install manual faq linux serwer install ? | Click Link Free documentation LINUX | LDP autor guide - Free linux manual's download help ? You also can add you work !!!! | Click Link Free Online Guide | Guide to managing media in linux community online internet linux community linux on-line manual free online guide |
The Bash shell provides command-line tools for editing and manipulating a user's command history. This is primarily a convenience, a means of saving keystrokes.
Bash history commands:
history
fc
bash$ history
1 mount /mnt/cdrom
2 cd /mnt/cdrom
3 ls
...
|
Internal variables associated with Bash history commands:
$HISTCMD
$HISTCONTROL
$HISTIGNORE
$HISTFILE
$HISTFILESIZE
$HISTSIZE
$HISTTIMEFORMAT (Bash, ver. 3.0 or later)
!!
!$
!#
!N
!-N
!STRING
!?STRING?
^STRING^string^
Unfortunately, the Bash history tools find no use in scripting.
#!/bin/bash # history.sh # Attempt to use 'history' command in a script. history # Script produces no output. # History commands do not work within a script. |
bash$ ./history.sh (no output) |
The Advancing in the Bash Shell site gives a good introduction to the use of history commands in Bash.