-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 8/10/19 9:33 am, Craig Sanders via luv-main wrote: > Either with 'find ... -exec' or, if you need to process find's list > of filenames (with grep or sed or something) make sure you use NUL > separated output and tools that can handle NUL-separated input > (e.g. 'find ... -print0 | grep -z ... | head -z -n 10 | xargs > -0r') find badly needs an option for sorting the output via timestamps. Want the last version of a file: ls -rt|tail -1 How do you do that with find? > Most GNU tools these days have a '-z' option for that. some others > do too. and perl has '-0', as does 'xargs'. With awk you can set > the input (and/or output) record separator with RS="\0" (or > ORS="\0"). - -print0 is very useful and I use it all the time, usually with xargs -0 Cheers A. -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQTJAoMHtC6YydLfjUOoFmvLt+/i+wUCXZyoFQAKCRCoFmvLt+/i +2ydAP469YS8NFe0QeIZaHB0MN/LJO2irR5YA/whIpuXjOGzngEA0fyXE0ZYv0Xf tkCFyhPJHIr+Mmar65C7SyC/lZEfXks= =NhXe -----END PGP SIGNATURE----- _______________________________________________ luv-main mailing list luv-main@luv.asn.au https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main