Date: Mon, 09 Feb 2026 20:43:43 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 293071] bsdtar -s pattern does not support delimiter quoting Message-ID: <bug-293071-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293071 Bug ID: 293071 Summary: bsdtar -s pattern does not support delimiter quoting Product: Base System Version: 16.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: wosch@FreeBSD.org I tried to add a prefix for a tarball. bsdtar has an option -s pattern. -s pattern Modify file or archive member names according to pattern. The pattern has the format /old/new/[bghHprRsS] where old is a basic regular expression, new is the replacement string of the matched part, and the optional trailing letters modify how the replacement is handled It works well except if I include a slash: touch a.c b.c bsdtar -cvf c.tar -s '/^/foobar/\/' a.c b.c bsdtar: Invalid replacement flag / After some trial and error I find out that you can use other delimiters, as '|' or '#' $ bsdtar -cvf c.tar -s '|^|foobar/|' a.c b.c a foobar/a.c a foobar/b.c I don't know if this is intentional or worth fixing. At least we should document the current behaviour in the manual page, and add an example. E.g.: --------------------- Note: you cannot quote the / delimiter. In that case use an other characters as '|' bsdtar -cvf c.tar -s '|^|new-dir/|' a.c b.c --------------------- -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-293071-227>
