#!/bin/tcsh

set var = "helloworld/"

## http://dbaspot.com/shell/350417-sed-removing-trailing.html
set var = `echo "$var" | sed -e 's,\(.\)/$,\1,'`

echo $var