Why do errors like "hist: 1-0: invalid range" generate while executing the script from ksh if ~.sh_history file is empty?
Issue
- If the
~.sh_history
file is empty, and trying to run thehistory
command from the terminal is not giving any error, but if one run the same command from the script, is giving the below error.
./test.sh[1]: hist: 1-0: invalid range
- Why does
ksh
behave differently for the same command?
Environment
- Red Hat Enterprise Linux 6.5
- ksh
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.