LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell variable storing the previously executed command (https://www.linuxquestions.org/questions/linux-newbie-8/shell-variable-storing-the-previously-executed-command-809643/)

late_nighter 05-23-2010 01:29 PM

Shell variable storing the previously executed command
 
I want to use PROMPT_COMMAND variable to build a history of all the commands i execute. So Basically i want to append the last executed command to my own command log file. How can i find the last executed command ?

I want to add PROMPT_COMMAND="echo $last_executed_command >> my_command_log" But I am not sure how to find the last executed command

tredegar 05-23-2010 01:46 PM

What is wrong with the command history ?

late_nighter 05-23-2010 01:50 PM

What i intend to do finally is have a single file that stores history of all the commands i run from the different systems i work from.

And I want unlimited history log not limited by HISTSIZE


All times are GMT -5. The time now is 04:10 AM.