Confused with the usage of one variable usage

Hi All

I am not able to understand the usage of d# in the below variable declaration.

FILE_LOC contains the directory path

And also help me to know about what will be saved in the variable j.

Thanks!!!

j=${d#${FILE_LOC}/}

see below this might help

ok.. this is an excerpt from man ksh
           ${parameter#pattern}
           ${parameter##pattern}
                               If the shell pattern matches the beginning of
                               the value of parameter, the value of this
                               substitution is the value of the parameter
                               with the matched portion deleted; otherwise
                               the value of this parameter substituted.  In
                               the former case, the smallest matching
                               pattern is deleted; in the latter case, the
                               largest matching pattern is deleted


basically FILE_LOC is a location and d is also a location and if ur pattern of location matches with each other. then only the portion (directory in the last that is not being matched is shown)

my doubt got clarified. Thanks :slight_smile: