On 9/1/20 5:14 AM, almahdi wrote:
> How to get last commnda history line number purely & directly on bash script
> or prompt ?
> as it's pure & directly viable in PS1 env. var.
> PS1=`echo \!`
The history number, or index in the history list, of the current
command. Assignments to HISTCMD are ignored. If HISTCMD is un-
set, it loses its special properties, even if it is subsequently
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ch...@case.edu http://tiswww.cwru.edu/~chet/