I use aliases a lot but right now only for use cases like alias i='sudo apt-get install -y'. I often would like to add an alias in the following form:
alias cmd='echo [something] >> /path/to/file' where I would like to substitute [something] with what I enter after the cmd.
I can obviously create a one-line script,save it somewhere and make an alias to that command but since I only want to substitute only 1 word in a pipe, is there a simpler way to do this?