#!/bin/tcsh -f #Add a shell escape before the first dash in argument # @escape- one -two three set ll = () foreach jjj ($*) #Needed to add two \\ to the rash of '\' in sed's command. That's not needed on command line but it has to be in the script set a = "`echo $jjj | sed 's/^-/\\\\-/'`" #echo ddd $jjj "$a" set ll = ($ll "$a") end echo "$ll"