mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-28 10:04:18 +02:00
doc: use $(...), not ... in documentation and comments
* doc/coreutils.texi (dircolors invocation, Examples of expr): (shred invocation, seq invocation): Use $(...), not `...`. * src/mv.c (do_move): Likewise, in a comment.
This commit is contained in:
@@ -7474,7 +7474,7 @@ terminal for color output from @command{ls} (and @command{dir}, etc.).
|
||||
Typical usage:
|
||||
|
||||
@example
|
||||
eval "`dircolors [@var{option}]@dots{} [@var{file}]`"
|
||||
eval "$(dircolors [@var{option}]@dots{} [@var{file}])"
|
||||
@end example
|
||||
|
||||
If @var{file} is specified, @command{dircolors} reads it to determine which
|
||||
@@ -9131,7 +9131,7 @@ The intended use of this is to shred a removed temporary file.
|
||||
For example:
|
||||
|
||||
@example
|
||||
i=`mktemp`
|
||||
i=$(mktemp)
|
||||
exec 3<>"$i"
|
||||
rm -- "$i"
|
||||
echo "Hello, world" >&3
|
||||
@@ -12222,7 +12222,7 @@ Here are a few examples, including quoting for shell metacharacters.
|
||||
To add 1 to the shell variable @code{foo}, in Bourne-compatible shells:
|
||||
|
||||
@example
|
||||
foo=`expr $foo + 1`
|
||||
foo=$(expr $foo + 1)
|
||||
@end example
|
||||
|
||||
To print the non-directory part of the file name stored in
|
||||
@@ -16308,7 +16308,7 @@ If you want hexadecimal integer output, you can use @command{printf}
|
||||
to perform the conversion:
|
||||
|
||||
@example
|
||||
$ printf '%x\n' `seq 1048575 1024 1050623`
|
||||
$ printf '%x\n' $(seq 1048575 1024 1050623)
|
||||
fffff
|
||||
1003ff
|
||||
1007ff
|
||||
|
||||
2
src/mv.c
2
src/mv.c
@@ -174,7 +174,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
|
||||
parent. It doesn't make sense to move a directory into itself, and
|
||||
besides in some situations doing so would give highly nonintuitive
|
||||
results. Run this 'mkdir b; touch a c; mv * b' in an empty
|
||||
directory. Here's the result of running echo `find b -print`:
|
||||
directory. Here's the result of running echo $(find b -print):
|
||||
b b/a b/b b/b/a b/c. Notice that only file 'a' was copied
|
||||
into b/b. Handle this by giving a diagnostic, removing the
|
||||
copied-into-self directory, DEST ('b/b' in the example),
|
||||
|
||||
Reference in New Issue
Block a user