bug-gnu-utils
[Top][All Lists]
Advanced

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

RE: Easier to read diff -u output


From: Bruce Korb
Subject: RE: Easier to read diff -u output
Date: Wed, 15 Nov 2006 15:28:00 -0800
User-agent: Thunderbird 1.5.0.7 (X11/20060911)

>
> I've got a larger and much more realistic example posted at
> http://linux.ucla.edu/~dsh/patches/diff-more-readable.html 
> <http://linux.ucla.edu/%7Edsh/patches/diff-more-readable.html>
I've got a similar sized diff that reminds me of another
useful consideration:

@@ -47,12 +60,20 @@
 
 test_onehost()
 {
+    set_func test_onehost
+    val_onehost_params
     seed=${RANDOM}
-    wwg1=$(printf 123456789ABC%04X ${seed} | \
+    test -z "${seed}" && seed=`date +%M%S|sed 's/^0*//'`
+    typeset wwg1=$(printf 432187659ABC%04X ${seed} | \
            sed 's/\(.\{16\}\).*/\1/' )
-    wwg2=$(printf 123456789ABC%04X $(( ${seed} + 1 )) | \
+    typeset wwg2=$(printf 432187659ABC%04X $(( ${seed} + 1 )) | \
            sed 's/\(.\{16\}\).*/\1/' )
-    cli > ${ST_SAVE_DIR}/setup.stdout 2> ${ST_SAVE_DIR}/setup.stderr
<<- _EOF_
+    exec 5> ${ONE_HOST_SAVE_DIR}/config
+    echo typeset testname=${testname} >&5
+    printf 'typeset wwg1=%s\ntypeset wwg2=%s\n' ${wwg1} ${wwg2} >&5
+
+    cli > ${ONE_HOST_SAVE_DIR}/setup.stdout \
+       2> ${ONE_HOST_SAVE_DIR}/setup.stderr <<- _EOF_
     createhost ${testname}-1 ${wwg1}
     createhost ${testname}-2 ${wwg2}

Something along the lines of, "if there is just the occasional
line that matches, then _even_if_ the line is more complex
than, say, ``^[[:space:]]*{[[:space:]]*$'', the line should be
considered part of the block of replaced text."

Making this new feature the default would be wonderful!  :)
Thank you for doing it, Dan!

Regards, Bruce





reply via email to

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