Note: by sand or sand block, I mean any block affected by gravity.
So to perform this glitch, you place/bring a shulker on the ground, you then place a piston facing the shulker 1 block up and to the left of it.
You then place a block, let's say an oak plank for example, on top of the piston. Then you place a bunch of sand above the shulker (tapping/clicking on the oak plank from the side so it falls onto the shulker) and once you decided you put enough sand, you place a lever or button, etc. on the piston and power it. When you do that it pushes all of the sand in front of it in a line as long as how many sand blocks you placed.
Note: when spamming the sand you'll have to wait until the shulker lowers to place another one.
This glitch used to exist when using a piston and fence gate, but that is a different (unpatched currently) way of doing the same thing.