coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] df: port the new df test to POSIX sed, larger file systems


From: Bernhard Voelker
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
Date: Fri, 09 Nov 2012 10:50:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

On 11/09/2012 10:13 AM, Paul Eggert wrote:
> * tests/df/df-output.sh: For the test "df -B1K --output=size",
> do not assume that the file system size fits in 9 bytes; it
> might be larger than that, so omit leading space.  Also, use
> portable 'sed' commands: POSIX says sed commands inside { } should
> all end in newline.

Good catch, thanks.
My file system for '.' is too small for this test to fail ... ;-)

> -sed -e '1 {s/ [ ]*/ /g;q}' out > out2
> +sed -e '1 {
> +          s/ [ ]*/ /g
> +          s/^ //
> +          q
> +        }' out > out2

What about simplifying the first s/... to eliminate all blanks?

-sed -e '1 {s/ [ ]*/ /g;q}' out > out2
+sed -e '1 {
+          s/ //g
+          q
+        }' out > out2

Have a nice day,
Berny



reply via email to

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