Often when moving files around, I need to do the opposite later. So in my .bashrc I included this working code:
rmv() {
mv $2/${1##*/} ${1%/*}
}
Now I wonder why I can't write this as a single liner. This is what I tried:
rmv() {mv $2/${1##*/} ${1%/*}}
If I do so, I get this error:
-bash: .bashrc: line 1: syntax error near unexpected token `{mv'