On Monday 05 September 2005 23:00, Jean Delvare wrote:
> I have written a different replacement which continues to use awk
> instead. I plan to commit it if nobody objects. It is appended to this
> post, comments and testers welcome. Basically the idea is to sort the
> list beforehand (using the sort Unix command), pass a sorted list to awk
> and get the awk script to simply preserve this input order.
Nice.
> [...]
> > END {
> - i = 1
> - for (file in files) {
> - if (!(file in printed)) {
> - new_files[i]=file
> - i++
> - }
> - }
> - n = asort(new_files)
> for (i=1; i<=n; i++)
"i<=n" needs to be changed to "i in new_files" as well, and new_files also
should be removed completely.
> - print new_files[i]
> + if (!(new_files[i] in printed))
> + print new_files[i]
> }
> '
> }
Thanks,
Andreas.
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev