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
DejaVu Sans Mono
Droid Sans Mono
Envy Code R
Source Code Pro
The default, whatever it is
Results (70 votes). Check out past polls.