On Sat, May 04, 2019 at 01:48:01PM +0200, Jonas Smedegaard wrote: > Quoting Erik Christiansen (2019-05-04 08:43:53) > > $ which lmount > > lmount is a function > > lmount () > > { > > pmount $1 `e2label $1` > > } > > I recommend to install package shellcheck and run "shellcheck lmount".
My initial reaction was similar, but he might not be using a regular shell. At the very least, his "which" command is not the standard which(1) utility, because that wouldn't know about shell functions. So, either he isn't in bash/ksh/dash, or his "which" command has been overridden with a function or alias. (On the other hand, his output from "which" looks identical to bash's "type" output. So maybe he did something like alias which=type.) At the end of the day, if this is supposed to be a bash function, it has three quoting errors, and is using the ancient deprecated command substitution syntax (which will work in this case, but is not a good habit).