This question already has an answer here:
- Include command in output file? 9 answers
I want to know how I can include the current working directory (output of
pwd) to the commands stored in
I want this because sometimes same command is executed from different directories. It's really helpful to know from which directory a particular instance of a command was executed.