I'm getting unexpected results using the history command in a bash shell using kernal 22.214.171.124. I would expect the line
history > historylog.txt
to save the contents of the history file into file historylog.txt but the file is always empty. Similar command lines in the sheel produce files as expected.
If I execute the same line at the command prompt the target file is created as expected. I don't see this on other ubuntu machines. Any thoughts on this?