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_historyfile is empty, and trying to run thehistorycommand 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
kshbehave 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
