$0 shell variables

Would appreciate if someone can explain the ${0##/} line. What does it do?
I am aware that $0 is the script name, $# is number of arguments passed in, $
is all the arguments. With the curly brackets {} added in, what's the eventual effect?
Does ${0##/} actually equals $0$#$? (something like factorising?)

myscript.sh

.
.
LOGFILE=$MYLOG/${0##*/}.logfile
.
.

What does your code return ... I just test on my shell ... and I get

[~]$ cat try.sh
#!/bin/bash
MYLOG="mylog"
LOGFILE=$MYLOG/${0##*/}.logfile
echo $LOGFILE

Output:

[~]$ ./try.sh
mylog/try.sh.logfile

Do you get different output ??

This is a parameter expansion implemented by ksh, bash and possibly other shells and documented in these shell respective manual pages which I recommend you to read.

It means here remove all directory components that might appear in $0. It is equivalent to using `basename $0` but faster.

that is shell's string operations.

yeah, if you see the result it is same as basename $0

${0##*/} is removing everything before "/" from the variable $0.

so its returning just the script name itself, without absolute path or ./ ( if executed from the current dir).

built in shell operations are always faster than external commands eg basename as per my knowledge.

see man pages for shell for more details.