2 ms·
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
by scott_karana 10y ago
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"`
- deleted 10y ago[deleted]