Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  file=$(echo `basename "$file"`)
This is a horrible example, since it has a "useless use of echo", forcing nested evaluations and a bashism. Basename prints to stdout too!

The sh-compatible, simpler equivalent:

  file=`basename "$file"`


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: