Let's say I want to modify the original behavior of the ls
tool this way:
$ ls
Hello World
file1 file2 ...
How can I do this?
When running ls
I would like to run another command let's say echo "Hello World!"
.
The quick solution I see is using alias:
alias orig_ls="ls"
alias ls='echo "Hello World!"'
However, this is not a real solution since when I will run orig_ls
it will output "Hello World!"
.