I would like to know how to add something to the end of a specific bash command without having to type it out explicitly.
For example, I would like to be able to type:
$ mycommand argument
and the line will be submitted as:
$ mycommand argument &
I know how to set up an alias in my .bashrc
(e.g. alias command="command -i"
) which will let me add non-positional arguments but I can't figure out how add something to the end.
Define a shell function.
mycommand () {
command mycommand "$@" &
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With