CVS version of GNU tar implements --quoting-style and --quote-chars command line options that control the way tar quotes member names on output. The --quoting-style takes an argument, specifying the quoting style to use (literal, shell, shell-always, c, escape, locale, clocale). The argument to --quote-chars option is a string adding characters to a list of quoted characters. The option --no-quote-chars is provided to disable quoting certain characters. Below are a couple of examples, illustrating how these options would affect the test case proposed by Helmut[1]:
$ tar --quoting-style=shell -tvf archive drwxr-xr-x gray/staff 0 2006-01-12 21:14 ./ -rw-r--r-- gray/staff 0 2006-01-12 21:12 ./link lrwxrwxrwx gray/staff 0 2006-01-12 21:12 './file ->' -> link lrwxrwxrwx gray/staff 0 2006-01-12 21:12 ./file -> '-> link' $ tar --quoting-style=c -tvf archive drwxr-xr-x gray/staff 0 2006-01-12 21:14 "./" -rw-r--r-- gray/staff 0 2006-01-12 21:12 "./link" lrwxrwxrwx gray/staff 0 2006-01-12 21:12 "./file ->" -> "link" lrwxrwxrwx gray/staff 0 2006-01-12 21:12 "./file" -> "-> link" $ tar --quote-chars=" " -tvf archive drwxr-xr-x gray/staff 0 2006-01-12 21:14 ./ -rw-r--r-- gray/staff 0 2006-01-12 21:12 ./link lrwxrwxrwx gray/staff 0 2006-01-12 21:12 ./file\ -> -> link lrwxrwxrwx gray/staff 0 2006-01-12 21:12 ./file -> ->\ link Regards, Sergey [1] http://lists.gnu.org/archive/html/bug-tar/2006-01/msg00019.html _______________________________________________ Bug-tar mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-tar
