[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: panel.sh modification suggestion (faster (once a second) clock update)
- To: Thorsten Wißmann <edu _at_ thorsten _minus_ wissmann _dot_ de>
- Subject: Re: panel.sh modification suggestion (faster (once a second) clock update)
- From: Raf Cloesen <rafcloesen _at_ yahoo _dot_ com>
- Date: Tue, 2 Apr 2013 22:11:20 -0700 (PDT)
Hi, I apologize for my erroneous allegations. The problem was indeed on my side. I should have studied the code more before writing to this mailing list. I have, therefore corrected my mistake. Your mail has been of great help to me in doing so. Your suggestion of a problem with fflush() was correct. As it turns out, Debain's MAWK behaves different from GAWK in the way it handels buffers (*). I have no knowledge about buffers, and therefore do not understand the tecnical side of the issue. Yet I read about an option that makes MAWK behave in the way expected. So by changing line 44:
awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
with:
awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@"
the problem gets fixed.
Some information about my MAWK version:
rafcloesen _at_ RafCloesen:~$ mawk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
compiled limits:
max NF 32767
sprintf buffer 1020
rafcloesen _at_ RafCloesen:~$ aptitude show mawk
Package: mawk
State: installed
Automatically installed: no
Multi-Arch: foreign
Version: 1.3.3-17
Priority: required
Section: interpreters
Maintainer: Steve Langasek <vorlon _at_ debian _dot_ org>
Architecture: i386
Uncompressed Size: 191 k
PreDepends: libc6 (>= 2.11)
Provides: awk
Description: a pattern scanning and text processing language
Mawk is an interpreter for the AWK Programming Language. The AWK language is useful for manipulation of data files,
text retrieval and processing, and for prototyping and experimenting with algorithms. Mawk is a new awk meaning it
implements the AWK language as defined in Aho, Kernighan and Weinberger, The AWK Programming Language,
Addison-Wesley Publishing, 1988. (Hereafter referred to as the AWK book.) Mawk conforms to the POSIX 1003.2 (draft
11.3) definition of the AWK language which contains a few features not described in the AWK book, and mawk provides
a small number of extensions.
Mawk is smaller and much faster than gawk. It has some compile-time limits such as NF = 32767 and sprintf buffer =
1020.
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593504