[Top][All Lists]

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

Re: portable use of 'dd'

From: Bruno Haible
Subject: Re: portable use of 'dd'
Date: Wed, 14 May 2008 23:16:53 +0200
User-agent: KMail/1.5.4

Hi GNU standards maintainers,

Jim Meyering wrote in [1]
>       use dd ibs=$n count=1 ... rather than less-portable head -c$n

The GNU standards, section "Utilities in Makefiles", do not mention 'dd'
among the list of utilities whose existence can be assumed everywhere.

But on all platforms that I tested (including old ones like IRIX 6.5, OSF/1 4.0,
Solaris 2.5.1), 'dd' exists, and
  $ echo abcdef | dd ibs=4 count=1 2>/dev/null; echo
yields the output

Therefore I would suggest to add 'dd' among the "safe" utilities.

--- doc/make-stds.texi.orig     2008-05-14 23:15:34.000000000 +0200
+++ doc/make-stds.texi  2008-05-14 23:15:17.000000000 +0200
@@ -160,7 +160,7 @@
 @c mkfifo mknod tee uname
-awk cat cmp cp diff echo egrep expr false grep install-info
+awk cat cmp cp dd diff echo egrep expr false grep install-info
 ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true
 @end example


[1] http://lists.gnu.org/archive/html/bug-gnulib/2008-05/msg00067.html

reply via email to

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