$ printf 'echo 1234\necho 2345\necho 3456\n' > history $ HOME=$PWD HISTFILE=history TERM=xterm bash --norc -i <<<$'\20\eb1\e[5~\nhistory\n\20\20\eb2\e[5~\nhistory' bash-5.3$ echo 1234 1234 bash-5.3$ history 1 echo 1234 2 echo 2345 3 echo 13456 4 echo 1234 5 history bash-5.3$ echo 2345 2345 bash-5.3$ history 1 echo 1234 2 echo 2345 3 echo 13456 4 echo 21234 5 history 6 echo 2345 7 history bash-5.3$ exit $ cat history echo 1234 echo 2345 echo 3456 echo 21234 history echo 2345 history
-- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."