4 ms·
No, I'm not looking to fork and exec a second program, and short of busybox most shells don't have basename built in. Common idiom, works in POSIX /bin/sh, bas
by JoshTriplett 15y ago
No, I'm not looking to fork and exec a second program, and short of busybox most shells don't have basename built in.
Common idiom, works in POSIX /bin/sh, bash, dash, ash, and every other sh I've encountered. I make a point of avoiding bashisms in /bin/sh scripts, but I have no problem counting on POSIX sh. :)