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