Andreas Schwab wrote on 02-02-07 18:18:
[EMAIL PROTECTED] (Bob Proulx) writes:Then Mike's suggestion of using the shell directly is the best choice for efficiency. No process forks and everything is done internally to the shell. It should be quite fast. dirname - ${foo%/*}Note that this is not a full replacement. It doesn't correctly handle names without a directory component.
Reminds me of something. This is largely off-topic, but does anyone know of a utility FOO that takes a path or file as input an outputs a full, absolute, rooted path? E.g. $> cd / && FOO /etc/termcap /etc/termcap $> cd /etc && FOO termcap /etc/termcap $> cd /etc && FOO ../etc/./termcap /etc/termcap bjd _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
