"tcsh Remove trailing /" 1 2 3 4 5 6 7 8#!/bin/tcsh set var = "helloworld/" ## http://dbaspot.com/shell/350417-sed-removing-trailing.html set var = `echo "$var" | sed -e 's,\(.\)/$,\1,'` echo $var