[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] doc: use $(...), not `...` in documentation and comments

From: Jim Meyering
Subject: [PATCH] doc: use $(...), not `...` in documentation and comments
Date: Mon, 26 Mar 2012 11:17:02 +0200

I saw that there were still a few uses of `...` in documentation and
couldn't resist.  There are plenty more in tests, but they will wait.

>From a4d14d3533099c5c8c47be491fa8fc62ecdc40bd Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 26 Mar 2012 07:38:27 +0200
Subject: [PATCH] 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.
 doc/coreutils.texi |    8 ++++----
 src/mv.c           |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 3920249..510abb9 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7474,7 +7474,7 @@ dircolors invocation
 Typical usage:

-eval "`dircolors address@hidden@dots{} address@hidden"
+eval "$(dircolors address@hidden@dots{} address@hidden)"
 @end example

 If @var{file} is specified, @command{dircolors} reads it to determine which
@@ -9131,7 +9131,7 @@ shred invocation
 For example:

 exec 3<>"$i"
 rm -- "$i"
 echo "Hello, world" >&3
@@ -12222,7 +12222,7 @@ Examples of expr
 To add 1 to the shell variable @code{foo}, in Bourne-compatible shells:

-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 @@ seq invocation
 to perform the conversion:

-$ printf '%x\n' `seq 1048575 1024 1050623`
+$ printf '%x\n' $(seq 1048575 1024 1050623)
diff --git a/src/mv.c b/src/mv.c
index b1d4e79..ee2f5a1 100644
--- a/src/mv.c
+++ b/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, 
              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),

reply via email to

[Prev in Thread] Current Thread [Next in Thread]