The `\(aq` special character escape sequence is not universally portable. Indirect it through a string definition. (GNU Bash also uses this technique.[1])
[1] https://github.com/bminor/bash/blob/a8a1c2fac029404d3f42cd39f5a20f24b6e4fe4b/doc/bash.1#L26 --- find/find.1 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/find/find.1 b/find/find.1 index 5de8c57e..0cac600a 100644 --- a/find/find.1 +++ b/find/find.1 @@ -2,10 +2,12 @@ .TH FIND 1 2025-10-12 findutils \" -*- nroff -*- .ie \n(.g \{\ . ds " \(dq +. ds ' \(aq .\} .el \{\ . \" \*" is not usable in macro arguments on AT&T troff. . ds " ""\" two adjacent quotes and no space before this comment +. ds ' ' .\} .SH NAME find \- search for files in a directory hierarchy @@ -2345,7 +2347,7 @@ .SS Processing arbitrary starting points .nf \& .in +4n -.B $ find .\& \-type f \-exec file \(aq{}\(aq \e; +.B $ find .\& \-type f \-exec file \*'{}\*' \e; .in \& .fi @@ -2372,14 +2374,14 @@ .SS Traversing the filesystem just once \(en for 2 different actions .in +4n .B $ find / \e .in +4n -.B \e( \-perm \-4000 \-fprintf /root/suid.txt \(aq%#m %u %p\en\(aq \e) , \e +.B \e( \-perm \-4000 \-fprintf /root/suid.txt \*'%#m %u %p\en\*' \e) , \e .br -.B \e( \-size +100M \-fprintf /root/big.txt \(aq%\-10s %p\en\(aq \e) +.B \e( \-size +100M \-fprintf /root/big.txt \*'%\-10s %p\en\*' \e) .in -4n .in -4n \& .fi -This example uses the line-continuation character \(aq\e\(aq on the first two +This example uses the line-continuation character \*'\e\*' on the first two lines to instruct the shell to continue reading the command on the next line. . .SS @@ -2521,7 +2523,7 @@ .SS Traversing the filesystem just once \(en for 2 different actions \& .in +4n .B $ cd /source-dir -.B $ find .\& \-name .snapshot \-prune \-o \e( \e! \-name \(aq*~\(aq \-print0 \e) \e +.B $ find .\& \-name .snapshot \-prune \-o \e( \e! \-name \*'*~\*' \-print0 \e) \e .br .in +4n .B | cpio \-pmd0 /dest-dir @@ -2561,9 +2563,9 @@ .SS Traversing the filesystem just once \(en for 2 different actions .in +4n .B $ find repo/ \e .in +4n -.B \e( \-exec test \-d \(aq{}/.svn\(aq \e; \e -.B \-or \-exec test \-d \(aq{}/.git\(aq \e; \e -.B \-or \-exec test \-d \(aq{}/CVS\(aq \e; \e +.B \e( \-exec test \-d \*'{}/.svn\*' \e; \e +.B \-or \-exec test \-d \*'{}/.git\*' \e; \e +.B \-or \-exec test \-d \*'{}/CVS\*' \e; \e .B \e) \-print \-prune .in -4n .in -4n @@ -2813,7 +2815,7 @@ .SS \(lqpaths must precede expression\(rq error message to use the pattern with the wildcard during the search for file name matching instead of file names expanded by the parent shell: .nf -.B $ find .\& \-name \(aq*.c\(aq \-print +.B $ find .\& \-name \*'*.c\*' \-print .B $ find .\& \-name \e*.c \-print .fi . -- 2.30.2
signature.asc
Description: PGP signature
