in reply to Playing with code found on Perlmonks
This could be rewritten:
fname=`echo $fname|sed 's/~/\/home\/ben/g'`
fname=`echo $fname|perl -pe "s#~#$HOME#g"`
Oh - I hadn't realized we were golfing. In Unix, as in Perl, TMTOWTDI.
# Bourne shell and derivatives
fname=`eval echo $fname`
# Modern shells (e.g., Bash)
Your turn, m'sieu? :)
Human history becomes more and more a race between education and catastrophe. -- HG Wells
Results (124 votes). Check out past polls.