Hello Tak, On Friday 24 of July 2009 00:17:07 Tak Ota wrote: > As a part of file name manipulation commands, in addition to the > current three commands (basename, dirname, pathchk) could you consider > introduction of a generic path name manipulation command? See > attached example.
did you considered use of canonicalize_file_name() from gnulib (also available in glibc)? It can manage many of operations implemented in your code. The function operates on ordinary C strings. The most frequently operation in your example is concatenation which is AFAIK trivial operation in all shells. So maybe we can do most of this by combining shell string concatenation and canonicalization. I am not sure what is the semantic of "negative paths". Should it cut prefix/postfix of the path? Or am I missing something? > The need of this type of command can be satisfied by combination of > other commands such as sed and awk but it is quite cumbersome as the > operation is frequently required in writhing Makefiles and shell > scripts in software development. Actually I don't know if we have some utility equivalent to canonicalize_file_name() function in coreutils now. If not I think it could be helpful to implement such utility. Kamil _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
