Linux is the best open-source platform to almost experiment with everything using various commands available.
Here, in your query, these are two commands =pwd and sed -e “s#/survey1##” = and we use these commands together in the pipeline. This means that the input of the second command will be the output of the first command.
The acronym of pwd is Print Working Directory and prints the current directory.
sed command is actually a completely different programming language with which many simple text-processing commands are done.
This is the simple sed program here - s#/survey1## - strips the string /survey1 out of its input, and prints the result.
Therefore the end result is that the variable PGMPATH becomes the current directory with /survey1 stripped out of it.