1

Call system command 'history' in linux [duplicate]

view story
linux-howto

http://stackoverflow.com – This question already has an answer here: Run BASH built-in commands in Python? 2 answers I am trying to using os.system function to call command 'history' but the stdout just show that 'sh :1 history: not found' Other example i.e. os.system('ls') is works. Does anyone can tell me why 'history' is not work, and how to call 'history' command in Python script. Thx! (HowTos)