How to add a command to the history when it is run inside of a bash script?

Viewed 531

I have a long command that I run with minor modifications routinely. To make the modifications easier, I put the command into a .sh file and edit with my favorite editor, then execute the .sh file.

I'd like the commands I run from inside that file to be added to the bash history. How can this be accomplished?

1 Answers
Related