[opensuse] Bash script problem regarding with some math
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have a bash script with this line: DIFF=$[ ($LOC_H - $HWC_H)*3600 + ($LOC_M - $HWC_M)*60 + ($LOC_S - $HWC_S) ] to calculate a time difference in seconds. Well, when the seconds are "08" it fails: cer@nimrodel:~> echo $[ (00 - 00)*3600 + (21 - 21)*60 + (08 -08) ] bash: (00 - 00)*3600 + (21 - 21)*60 + (08: value too great for base (error token is "08") Why? Notice that not all number combinations fail: cer@nimrodel:~> echo $[ (00 - 00)*3600 + (21 - 21)*60 + (01 -01) ] 0 cer@nimrodel:~> echo $[ (00 - 00)*3600 + (21 - 21)*60 + (01 -07) ] - -6 cer@nimrodel:~> echo $[ (01 - 01)*3600 + (21 - 21)*60 + (01 -08) ] bash: (00 - 00)*3600 + (21 - 21)*60 + (01 -08: value too great for base (error token is "08") Obviously, it is thinking it is an octal number. How do I convince bash to use standard base ten math? Is there a prefix? I get "08" out of cutting the seconds value from a time like "01:21:08"; removing the leading "0" is inconvenient, and absurd, IMO, and would take an inordinate length of coding. I could do something like: cer@nimrodel:~> echo $[ (100 - 100)*3600 + (121 - 121)*60 + (109 - 108) ] 1 which gives correct values, but again, it is an absurd hack. There must be some prefix for decimal numbers... :-? - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHXfc6tTMYHG2NR9URAnGdAJ9RyyFeuKKaUkON2RJkhyZ5N1B34QCfREku 1Feb2xJl5wLmTikOrm/dyOc= =R+io -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon December 10 2007 09:34:34 pm Carlos E. R. wrote:
Obviously, it is thinking it is an octal number. How do I convince bash to use standard base ten math? Is there a prefix?
Hi Carlos, A bit of Google research reveals the prefix '10#' tells bash to use base 10 (decimal) instead octal interpretation. What happens if you try this (or some derivative?) :-) DIFF=$[ (10#$LOC_H - 10#$HWC_H)*3600 + (10#$LOC_M - 10#$HWC_M)*60 + (10#$LOC_S - 10#$HWC_S) ] regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-12-10 at 22:55 -0500, Carl Hartung wrote:
On Mon December 10 2007 09:34:34 pm Carlos E. R. wrote:
Obviously, it is thinking it is an octal number. How do I convince bash to use standard base ten math? Is there a prefix?
Hi Carlos,
A bit of Google research reveals the prefix '10#' tells bash to use base 10 (decimal) instead octal interpretation. What happens if you try this (or some derivative?) :-)
Yes! Thanks! :-) cer@nimrodel:~> echo $[ (00 - 00)*3600 + (21 - 21)*60 + (10#08 - 10#09) ] - -1
DIFF=$[ (10#$LOC_H - 10#$HWC_H)*3600 + (10#$LOC_M - 10#$HWC_M)*60 + (10#$LOC_S - 10#$HWC_S) ]
Yes, of course. Done. Wish I were more confortable with google... didn't know what to tell it to search. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHXmRvtTMYHG2NR9URArpgAJ9joWutdevElt9gd9hMc3QzJO/rkACdHrMU Ued+V3uxqFBEV6a8miuTwlM= =6ZXm -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue December 11 2007 05:20:29 am Carlos E. R. wrote:
Yes! Thanks! :-)
cer@nimrodel:~> echo $[ (00 - 00)*3600 + (21 - 21)*60 + (10#08 - 10#09) ] -1
DIFF=$[ (10#$LOC_H - 10#$HWC_H)*3600 + (10#$LOC_M - 10#$HWC_M)*60 + (10#$LOC_S - 10#$HWC_S) ]
Yes, of course. Done.
Wish I were more confortable with google... didn't know what to tell it to search.
You're welcome! FWIW, I first tried searching the advanced bash scripting guide. The answer was there but in a shorthand form that requires prior comprehension. ;-) The key was to use the error message as the search term and wade through several threads. regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-12-11 at 06:18 -0500, Carl Hartung wrote:
Wish I were more confortable with google... didn't know what to tell it to search.
You're welcome!
FWIW, I first tried searching the advanced bash scripting guide. The answer was there but in a shorthand form that requires prior comprehension. ;-) The key was to use the error message as the search term and wade through several threads.
Duh! Of course... now that I see it. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHXodptTMYHG2NR9URAgDAAJ0c8mUiXgfC0XlSCLHdQgrrb29eWQCdFr20 FRUoT/Dp84Xlstd+Sy7icAQ= =rJJq -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 10 December 2007 18:34, Carlos E. R. wrote:
Hi,
I have a bash script with this line:
DIFF=$[ ($LOC_H - $HWC_H)*3600 + ($LOC_M - $HWC_M)*60 + ($LOC_S - $HWC_S) ]
to calculate a time difference in seconds. Well, when the seconds are "08" it fails:
As Carl mentioned, BASH acts like the C and C++ compilers in that a leading 0 signifies octal (base 8) numeric literals and a 0x prefix signifies hexadecimal (base 16). You say you're doing temporal math. You might want to look at whether "date" makes this easier for you. It can do some temporal math. Also, when the math required in shell scripts gets more than a little complicated, I usually switch to "dc". It's very flexible, though it uses reverse polish notation, so you have to either like HP calculators (I do) or learn to readjust your thinking about how you express arithmetic expressions. ... Oh, all right. I should mention "bc," too. It does infix. If you're into that sort of thing. Both have good man pages. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-12-10 at 21:22 -0800, Randall R Schulz wrote:
As Carl mentioned, BASH acts like the C and C++ compilers in that a leading 0 signifies octal (base 8) numeric literals and a 0x prefix signifies hexadecimal (base 16).
'Ox' I knew, but '0' for octal I forgot. Perhaps I always though it was 'Ou', not 'zero'. I never tried, as I never had use for octal.
You say you're doing temporal math. You might want to look at whether "date" makes this easier for you. It can do some temporal math.
I know, and I tried. But didn't find a way to do it. If you are curious, what I'm doing is compare the CMOS clock with the system clock, to prove it doesn't stray: set `/sbin/hwclock --show` HWC=$4 set `/bin/date +%T` LOC=$1 HWC_H=`echo $HWC | /usr/bin/cut --characters=1-2` HWC_M=`echo $HWC | /usr/bin/cut --characters=4-5` HWC_S=`echo $HWC | /usr/bin/cut --characters=7-8` LOC_H=`echo $LOC | /usr/bin/cut --characters=1-2` LOC_M=`echo $LOC | /usr/bin/cut --characters=4-5` LOC_S=`echo $LOC | /usr/bin/cut --characters=7-8` DIFF=$[ (10#$LOC_H - 10#$HWC_H)*3600 + (10#$LOC_M - 10#$HWC_M)*60 + (10#$LOC_S - 10#$HWC_S) ] if test $DIFF -gt 1 ; then logger -p daemon.error -t CLOCK -- CMOS clock differs $DIFF\" at $HWC fi Which now I think could be wrong... because DIFF could be negative and it wouldn't trigger. perhaps: if test $DIFF -gt 1 -o $DIFF -lt -1 ; then Or maybe there is something to get the absolute value.
Also, when the math required in shell scripts gets more than a little complicated, I usually switch to "dc". It's very flexible, though it uses reverse polish notation, so you have to either like HP calculators (I do) or learn to readjust your thinking about how you express arithmetic expressions.
Argh. No, I was a TI calculator type chap (TI 57, 58C...), never could use an HP. And I later found Casio (FX-850), so I can't/won't use anything else :-p
...
Oh, all right. I should mention "bc," too. It does infix. If you're into that sort of thing.
That's better ;-) No, I do not need that, for now, but I keep that info somewhere in the back of my mind.
Both have good man pages.
And "info" pages. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHXmcztTMYHG2NR9URAl4nAKCWcXuwQKGJijTy6kkB7ZqQhNTF3gCfSFZD hnZw1wfelEyiBEsc8UmObbA= =HxG9 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 11 December 2007 11:32:17 Carlos E. R. wrote:
The Monday 2007-12-10 at 21:22 -0800, Randall R Schulz wrote:
As Carl mentioned, BASH acts like the C and C++ compilers in that a leading 0 signifies octal (base 8) numeric literals and a 0x prefix signifies hexadecimal (base 16).
'Ox' I knew, but '0' for octal I forgot. Perhaps I always though it was 'Ou', not 'zero'. I never tried, as I never had use for octal.
You say you're doing temporal math. You might want to look at whether "date" makes this easier for you. It can do some temporal math.
I know, and I tried. But didn't find a way to do it.
If you are curious, what I'm doing is compare the CMOS clock with the system clock, to prove it doesn't stray:
set `/sbin/hwclock --show` HWC=$4
set `/bin/date +%T` LOC=$1
HWC=$(/bin/date -d "$(/sbin/hwclock --show)" +%s) LOC=$(/bin/date +%s) DIFF=$((LOC-HWC)) if test $DIFF -gt 1; then ....and so on Anders -- Madness takes its toll -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-12-11 at 19:21 +0100, Anders Johansson wrote:
HWC=$(/bin/date -d "$(/sbin/hwclock --show)" +%s) LOC=$(/bin/date +%s)
DIFF=$((LOC-HWC))
if test $DIFF -gt 1; then
Wow. :-O So easy... However... I think the end result is not correct, because the first line substract the "offset" from hwclock: nimrodel:~ # hwclock Tue Dec 11 20:36:12 2007 -0.470828 seconds ^^^^^ and I'm not sure that is correct. My idea is that when we do these two commands in sequence: hwclock --show ; date the time printed by both corresponds to (almost) the same instant, because the first command waits till the second boundary before exiting. I'm not certain, anyway, that's why I make the comparison >1 and not >0. Your code, by the way, discovers a bug in the syntax coloring of mcedit: it doesn't see both '"' quotes and does the wrong colours. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHXukMtTMYHG2NR9URAoO9AJ9QIE+lS4Ghj0C13uFMe42kMUiQWQCgkqqM Ybovs372VTo1daMzjvZuGmI= =UwhM -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 11 December 2007 02:32, Carlos E. R. wrote:
The Monday 2007-12-10 at 21:22 -0800, Randall R Schulz wrote:
...
If you are curious, what I'm doing is compare the CMOS clock with the system clock, to prove it doesn't stray:
set `/sbin/hwclock --show` HWC=$4
Two things: 1) Field four of the output from hwclock is the year. 2) The last field of the output is the current discrepancy between the hardware clock and the system clock. Isn't that what you're trying to learn?
...
Or maybe there is something to get the absolute value.
One my 10.0 system: % while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:14 AM PST -0.877900 seconds Tue 11 Dec 2007 10:25:25 AM PST -0.988284 seconds Tue 11 Dec 2007 10:25:36 AM PST -0.983046 seconds Tue 11 Dec 2007 10:25:47 AM PST -0.989136 seconds Tue 11 Dec 2007 10:25:58 AM PST -0.988547 seconds Tue 11 Dec 2007 10:26:09 AM PST -0.987777 seconds Tue 11 Dec 2007 10:26:20 AM PST -0.989716 seconds Tue 11 Dec 2007 10:26:31 AM PST -0.980444 seconds Tue 11 Dec 2007 10:26:42 AM PST -0.933735 seconds Tue 11 Dec 2007 10:26:53 AM PST -0.982149 seconds Tue 11 Dec 2007 10:27:04 AM PST -0.994643 seconds Tue 11 Dec 2007 10:27:15 AM PST -0.978735 seconds Tue 11 Dec 2007 10:27:26 AM PST -0.940854 seconds ^C On my 10.3 system: % while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:16 AM PST -0.000481 seconds Tue 11 Dec 2007 10:25:26 AM PST -0.000754 seconds Tue 11 Dec 2007 10:25:36 AM PST -0.000752 seconds Tue 11 Dec 2007 10:25:46 AM PST -0.000759 seconds Tue 11 Dec 2007 10:25:56 AM PST -0.000756 seconds Tue 11 Dec 2007 10:26:06 AM PST -0.000758 seconds Tue 11 Dec 2007 10:26:16 AM PST -0.000755 seconds Tue 11 Dec 2007 10:26:26 AM PST -0.000761 seconds Tue 11 Dec 2007 10:26:36 AM PST -0.000766 seconds Tue 11 Dec 2007 10:26:46 AM PST -0.000758 seconds Tue 11 Dec 2007 10:26:56 AM PST -0.000758 seconds Tue 11 Dec 2007 10:27:06 AM PST -0.000760 seconds ^C They're running on completely different hardware, but both use NTP.
...
Both have good man pages.
And "info" pages.
Gack!
-- Cheers, Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-12-11 at 10:28 -0800, Randall R Schulz wrote:
set `/sbin/hwclock --show` HWC=$4
Two things:
1) Field four of the output from hwclock is the year.
In mine, it is 'HH:MM:SS'. See: /sbin/hwclock --show set `/sbin/hwclock --show` echo -0 $0 -1 $1 -2 $2 -3 $3 -4 $4 HWC=$4 echo $4 nimrodel:~ # testtime Tue Dec 11 20:17:31 2007 -0.536433 seconds - -0 /root/bin/testtime -1 Tue -2 Dec -3 11 -4 20:17:32 20:17:32 Tue Dec 11 20:17:31 2007 -0.536433 seconds 1 2 3 4 5 6 7 I did my tests to check that days ago :-)
2) The last field of the output is the current discrepancy between the hardware clock and the system clock. Isn't that what you're trying to learn?
Yes and no... you can see if you execute this: hwclock --show ; date several times. I get: nimrodel:~ # hwclock --show ; date Tue Dec 11 20:26:27 2007 -0.598335 seconds Tue Dec 11 20:26:27 CET 2007 nimrodel:~ # hwclock --show ; date Tue Dec 11 20:26:30 2007 -0.502001 seconds Tue Dec 11 20:26:30 CET 2007 nimrodel:~ # hwclock --show ; date Tue Dec 11 20:26:32 2007 -0.274757 seconds Tue Dec 11 20:26:32 CET 2007 and you see the command waits some time before exiting; that wait time I think is that number. It probably waits till the next second boundary, then prints and exit. If it were the time difference beetween both clocks, it would be a constant.
...
Or maybe there is something to get the absolute value.
One my 10.0 system:
% while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:14 AM PST -0.877900 seconds Tue 11 Dec 2007 10:25:25 AM PST -0.988284 seconds Tue 11 Dec 2007 10:25:36 AM PST -0.983046 seconds Tue 11 Dec 2007 10:25:47 AM PST -0.989136 seconds Tue 11 Dec 2007 10:25:58 AM PST -0.988547 seconds Tue 11 Dec 2007 10:26:09 AM PST -0.987777 seconds Tue 11 Dec 2007 10:26:20 AM PST -0.989716 seconds Tue 11 Dec 2007 10:26:31 AM PST -0.980444 seconds Tue 11 Dec 2007 10:26:42 AM PST -0.933735 seconds Tue 11 Dec 2007 10:26:53 AM PST -0.982149 seconds Tue 11 Dec 2007 10:27:04 AM PST -0.994643 seconds Tue 11 Dec 2007 10:27:15 AM PST -0.978735 seconds Tue 11 Dec 2007 10:27:26 AM PST -0.940854 seconds ^C
On my 10.3 system:
% while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:16 AM PST -0.000481 seconds Tue 11 Dec 2007 10:25:26 AM PST -0.000754 seconds Tue 11 Dec 2007 10:25:36 AM PST -0.000752 seconds Tue 11 Dec 2007 10:25:46 AM PST -0.000759 seconds Tue 11 Dec 2007 10:25:56 AM PST -0.000756 seconds Tue 11 Dec 2007 10:26:06 AM PST -0.000758 seconds Tue 11 Dec 2007 10:26:16 AM PST -0.000755 seconds Tue 11 Dec 2007 10:26:26 AM PST -0.000761 seconds Tue 11 Dec 2007 10:26:36 AM PST -0.000766 seconds Tue 11 Dec 2007 10:26:46 AM PST -0.000758 seconds Tue 11 Dec 2007 10:26:56 AM PST -0.000758 seconds Tue 11 Dec 2007 10:27:06 AM PST -0.000760 seconds ^C
They're running on completely different hardware, but both use NTP.
The "number" is almost the same because the sample is taken with a period multiple of 1 second. If you do it manually, you will see greater differences - like my run: nimrodel:~ # hwclock --show ; date Tue Dec 11 20:28:06 2007 -0.136918 seconds Tue Dec 11 20:28:06 CET 2007 nimrodel:~ # hwclock --show ; date Tue Dec 11 20:28:08 2007 -0.152102 seconds Tue Dec 11 20:28:08 CET 2007 nimrodel:~ # hwclock --show ; date Tue Dec 11 20:28:11 2007 -0.350430 seconds Tue Dec 11 20:28:11 CET 2007 nimrodel:~ # hwclock --show ; date Tue Dec 11 20:28:14 2007 -0.001126 seconds Tue Dec 11 20:28:14 CET 2007 nimrodel:~ #
...
Both have good man pages.
And "info" pages.
Gack!
X'-) Try "pinfo" instead of "info". The human interface is ussable ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHXuUCtTMYHG2NR9URAhfqAJkBK0Wq2rlsELePMkjhO/5CwmGkVACdGfgX QEH1WZnfgnDc605lph0RFEY= =U2bT -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
On Tuesday 11 December 2007 02:32, Carlos E. R. wrote:
...
Both have good man pages. And "info" pages.
Gack!
WTF is with the FSF and their insistance on scrimping on the man pages, and only putting the detailed documentation in the info pages. And worse, they're quite snide about it. I'd like to strange each and every one of them with a a dog's choke-chain until they stop that nonsense. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Aaron Kulkis wrote:
Randall R Schulz wrote:
On Tuesday 11 December 2007 02:32, Carlos E. R. wrote:
Both have good man pages. And "info" pages. Gack! WTF is with the FSF and their insistance on scrimping on the man pages, and only putting the detailed documentation in the info pages.
And worse, they're quite snide about it.
*snicker*... but but but...isn't it derived from the interface god dictated to Stallman for Emacs? Your words border on heresy! As someone else mentioned, "pinfo", at least, has a bearable interface. Of course if you have a problem with the 'info' tool, you can always consult the 'info' page for info.... :-) (*sigh*) (not that I would agree with your sentiment or anything..:-)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 12 December 2007 23:07:01 Linda Walsh wrote:
Aaron Kulkis wrote:
Randall R Schulz wrote:
On Tuesday 11 December 2007 02:32, Carlos E. R. wrote:
Both have good man pages.
And "info" pages.
Gack!
WTF is with the FSF and their insistance on scrimping on the man pages, and only putting the detailed documentation in the info pages.
And worse, they're quite snide about it.
--- *snicker*... but but but...isn't it derived from the interface god dictated to Stallman for Emacs? Your words border on heresy!
As someone else mentioned, "pinfo", at least, has a bearable interface. Of course if you have a problem with the 'info' tool, you can always consult the 'info' page for info.... :-) (*sigh*) (not that I would agree with your sentiment or anything..:-))
using the info:/ url in konqueror makes reading info pages less like a nightmare To read the info page for bc in a format that won't make you cry, just go to info:/bc in konqueror Anders -- Madness takes its toll -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anders Johansson wrote:
On Wednesday 12 December 2007 23:07:01 Linda Walsh wrote:
Aaron Kulkis wrote:
Randall R Schulz wrote:
On Tuesday 11 December 2007 02:32, Carlos E. R. wrote:
Both have good man pages. And "info" pages. Gack! WTF is with the FSF and their insistance on scrimping on the man pages, and only putting the detailed documentation in the info pages.
And worse, they're quite snide about it.
*snicker*... but but but...isn't it derived from the interface god dictated to Stallman for Emacs? Your words border on heresy!
As someone else mentioned, "pinfo", at least, has a bearable interface. Of course if you have a problem with the 'info' tool, you can always consult the 'info' page for info.... :-) (*sigh*) (not that I would agree with your sentiment or anything..:-))
using the info:/ url in konqueror makes reading info pages less like a nightmare
To read the info page for bc in a format that won't make you cry, just go to info:/bc in konqueror
I'll keep that in mind. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 12 December 2007 15:14, Anders Johansson wrote:
...
using the info:/ url in konqueror makes reading info pages less like a nightmare
To read the info page for bc in a format that won't make you cry, just go to info:/bc in konqueror
That is what I do when I must read info pages. Unfortunately, it has become broken on my 10.0 system and I haven't taken the time to track down the problem.
Anders
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
[Randall R Schulz]
On Wednesday 12 December 2007 15:14, Anders Johansson wrote:
...
using the info:/ url in konqueror makes reading info pages less like a nightmare
To read the info page for bc in a format that won't make you cry, just go to info:/bc in konqueror
That is what I do when I must read info pages. Unfortunately, it has become broken on my 10.0 system and I haven't taken the time to track down the problem.
Hi, people. I did not follow this thread, so maybe that I repeat things that were already said -- sorry then. Please read me correctly: I'm only sharing opinions here on a friendly tone, not at all trying to aliment any kind of flame. Keep a smiley in your hearth! Merely call "info info" to know how to use the standard GNU "info" reader (within a terminal -- that's a curses application). Type "h" early on this page to get a small and child-easy tutorial. I'm surprised when people say that it is a nightmare to read Info format documentation, as it is really a very simple thing to do, for anyone with any small drop of good will. Nightmares, I would better understand for those having had a bad life and consequently, agitated sleep :-). But I'm kidding a bit, and know that some people who cannot stand Info are mouse addicts, while "info" requires the keyboard. For those who do not know, the keyboard is that big huge mouse next to the usual one, absolutely full of buttons, and which does not slide very well! :-) The simple truth is that Info never succeeded at taking over man pages in Linux. It would have been a good thing: Info is a superior documentation format in many ways. But life is that the amount of existing man pages is overwhelming, so all in all, and as sad as it is, Info is not practical, even if it would have been better. I'm not fully sure, but I think Info format even predates HTML. There was influences, and observable similarities for a few tag names. Some people, not liking Info, very well accept HTML, even if still not man pages. Yet, most HTML browsers are less capable than an average Info reader, when it comes to indices, wide searches, and a few other useful things. And printed Info (more precisely, Texinfo) is of superb typographical quality, compared to almost any HTML, which is fairly crude by comparison. On the man pages side, I quite agree that the typographical quality is very acceptable, much better than HTML! :-) -- François Pinard http://pinard.progiciels-bpi.ca -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
François Pinard wrote:
[Randall R Schulz]
On Wednesday 12 December 2007 15:14, Anders Johansson wrote:
...
using the info:/ url in konqueror makes reading info pages less like a nightmare
To read the info page for bc in a format that won't make you cry, just go to info:/bc in konqueror
That is what I do when I must read info pages. Unfortunately, it has become broken on my 10.0 system and I haven't taken the time to track down the problem.
Hi, people. I did not follow this thread, so maybe that I repeat things that were already said -- sorry then. Please read me correctly: I'm only sharing opinions here on a friendly tone, not at all trying to aliment any kind of flame. Keep a smiley in your hearth!
Merely call "info info" to know how to use the standard GNU "info" reader (within a terminal -- that's a curses application). Type "h" early on this page to get a small and child-easy tutorial.
I'm surprised when people say that it is a nightmare to read Info format documentation, as it is really a very simple thing to do, for anyone with any small drop of good will. Nightmares, I would better understand for those having had a bad life and consequently, agitated sleep :-).
But I'm kidding a bit, and know that some people who cannot stand Info are mouse addicts, while "info" requires the keyboard. For those who do not know, the keyboard is that big huge mouse next to the usual one, absolutely full of buttons, and which does not slide very well! :-)
The simple truth is that Info never succeeded at taking over man pages in Linux. It would have been a good thing: Info is a superior documentation format in many ways. But life is that the amount of existing man pages is overwhelming, so all in all, and as sad as it is, Info is not practical, even if it would have been better.
I'm not fully sure, but I think Info format even predates HTML. There was influences, and observable similarities for a few tag names. Some people, not liking Info, very well accept HTML, even if still not man pages. Yet, most HTML browsers are less capable than an average Info reader, when it comes to indices, wide searches, and a few other useful things. And printed Info (more precisely, Texinfo) is of superb typographical quality, compared to almost any HTML, which is fairly crude by comparison. On the man pages side, I quite agree that the typographical quality is very acceptable, much better than HTML! :-)
Dude I've been using Unix since 1983 Info is confusing as hell to anyone who doesn't use emacs on a daily basis. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-12-12 at 22:59 -0500, François Pinard wrote:
I'm surprised when people say that it is a nightmare to read Info format documentation, as it is really a very simple thing to do, for anyone with any small drop of good will. Nightmares, I would better understand for those having had a bad life and consequently, agitated sleep :-).
But I'm kidding a bit, and know that some people who cannot stand Info are mouse addicts, while "info" requires the keyboard. For those who do not know, the keyboard is that big huge mouse next to the usual one, absolutely full of buttons, and which does not slide very well! :-)
I don't think it is a nightmare, but I do find its keyboard interface awkward. I came to expect programs using the cursor to navigate, enter to select... etc. Ie, I expect it to behave like "pinfo". Sometimes info, or rather, pinfo, doesn't select the page I expect, but another; and I simply do not know how to tell it to search again. I'm trying to remember an example, but can't find it... but there is one that when I want, I get instead a "yes no something" page instead.
The simple truth is that Info never succeeded at taking over man pages in Linux. It would have been a good thing: Info is a superior documentation format in many ways. But life is that the amount of existing man pages is overwhelming, so all in all, and as sad as it is, Info is not practical, even if it would have been better.
Sometimes I do not like to browse: I prefer an expanded view with all in a single page, to read it from start to end. That is not selectable. Browse mode is better when you already know something and want to view a small part. But I hate when I have to navigate several subnodes to find the exact part I'm looking for, in trial and error browse mode. I then prefer the man page, if it exists, because a simple search finds it - if I remember an string, of course. I think that info pages are not bad, it's a good idea, that could benefit from a reviewed interface. And, as a translator, I simply have no idea how to translate info pages. I do not have to understand tags and things. I translate text. The fact is that not even "info info" is translated! (to Spanish). That is significative of the difficulty. There is no GUI program to easily edit/translate info pages. Something like LyX, for instance. For instance, "man man" is translated to Spanish... not that many pages are translated, only a few, and many are obsolete. But info pages? I don't know of any. Even man pages are difficult to translate... do you know what I do? I edit them directly with mcedit, which has syntax coloring. Program translation have the gettext utilities, and programs like poedit or kbabel to facilitate things. Info? Man? None. That's a complete failure, IMO. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHYRkAtTMYHG2NR9URAiBQAJwLloqnQwWuo8D7zswzmjEW/JQYbwCeLyni JTgdK6o7oYtMGvdKH6PPxG4= =krey -----END PGP SIGNATURE-----
On Thursday 13 December 2007 04:59:19 François Pinard wrote:
But I'm kidding a bit, and know that some people who cannot stand Info are mouse addicts, while "info" requires the keyboard. For those who do not know, the keyboard is that big huge mouse next to the usual one, absolutely full of buttons, and which does not slide very well! :-)
I work primarily with the keyboard, that's not what it's about info, for whatever reason, chose to have a completely different set of key bindings from any other application known to man. This is just stupidity, and I refuse to spend the brain power memorising them Anders -- Madness takes its toll -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-12-14 at 01:01 +0100, Anders Johansson wrote:
I work primarily with the keyboard, that's not what it's about
info, for whatever reason, chose to have a completely different set of key bindings from any other application known to man. This is just stupidity, and I refuse to spend the brain power memorising them
Forget 'info', use 'pinfo'. It is intuitive, uses colors, displays either man or info pages, depending on what it finds.... really nice. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHYdH8tTMYHG2NR9URAqX2AJoDGPFg5ObePEzeUY0Mk/bV3fr4lQCfcSQh mDbPnzTqnSQCgmdtFvEz06E= =aq8Y -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi, Carlos E. R. wrote:
Forget 'info', use 'pinfo'. It is intuitive, uses colors, displays either man or info pages, depending on what it finds.... really nice. I've tried it. Surely better to operate than info, especially it has vi key bindings for basic operations. But how to search for keywords within all pages ? E.g. for "precision" in "pinfo bc". With "/" it seems it searches only in the currently displayed page.
Regards, Stephan. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-12-14 at 04:27 +0100, Stephan Hegel wrote:
Carlos E. R. wrote:
Forget 'info', use 'pinfo'. It is intuitive, uses colors, displays either man or info pages, depending on what it finds.... really nice. I've tried it. Surely better to operate than info, especially it has vi key bindings for basic operations. But how to search for keywords within all pages ? E.g. for "precision" in "pinfo bc". With "/" it seems it searches only in the currently displayed page.
Unfortunately, you are right. There is an info page for pinfo... It has a configuration file. Keys are configurable. Searching for "search" in the index only finds "Node: Environment" ... good grief. In "Node: Keybindings" I see: KEY_TOTALSEARCH_1 Key for searching through all nodes of info file. KEY_TOTALSEARCH_2 Alternate key for searching through all nodes of info file. KEY_SEARCH_1 Key for searching through current node (or manual). KEY_SEARCH_2 Alternate key for searching through current node (or manual). So, we need to know which is the "KEY_TOTALSEARCH_1", but the infopage doesn't say. It has no online help through "?" or "h". Mmmm... if I type "s" or "S" for search, it does look in the whole file. I tried searching for "_pentium4" in "pinfo gcc", and it works. If you use "/" for search, then it only searchs the current node. That's it, then :-) Ah! There is an "/etc/pinforc" file. Sure enough, it has: KEY_TOTALSEARCH_1 = 's' KEY_TOTALSEARCH_2 = 'S' KEY_SEARCH_1 = '/' KEY_SEARCH_2 = '.' But I don't see how to search backwards. Ah, the cursor left key does it, goes to the previously found item. There is time to learn new tricks ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHYok+tTMYHG2NR9URAgqZAJ9crSXXeEa/Ulv4B4IQ01sA8L9V5gCfS9nh gq6ZzpnY008YXcc47ya6wGg= =CjEZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2007-12-14 at 14:46 +0100, Carlos E. R. wrote:
The Friday 2007-12-14 at 04:27 +0100, Stephan Hegel wrote:
Carlos E. R. wrote:
Forget 'info', use 'pinfo'. It is intuitive, uses colors, displays either man or info pages, depending on what it finds.... really nice. I've tried it. Surely better to operate than info, especially it has vi key bindings for basic operations. But how to search for keywords within all pages ? E.g. for "precision" in "pinfo bc". With "/" it seems it searches only in the currently displayed page.
Unfortunately, you are right. ... There is time to learn new tricks ;-)
Speaking of which ... there are lots of websites that contain HTML-formatted man pages. Are there any sites that have HTML-formatted info pages (preferably all pages for one app on one HTML page :) ? Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
[Dave Howorth]
there are lots of websites that contain HTML-formatted man pages. Are there any sites that have HTML-formatted info pages (preferably all pages for one app on one HTML page :) ?
Yes. Info pages are one by-product of Texinfo format, which also can produce laser-printable manuals, and HTML pages. At the very beginning, some people were writing Info pages directly, but it did not last. The proper way is writing Texinfo, and deriving Info out of it. In the tool generating HTML out of Texinfo, there are options for selecting one bulky HTML page, instead of one HTML per node. I see two reasons for why one would want one bulky page (I'm curious to know if there are other reasons): either because HTML browsers cannot conveniently search at once through a bunch of related pages, or else to print a manual in a single browser print request. I would think the above reasons come with HTML format. I remember that "info" knows to search through all nodes (a bit like Vim knows how to search in all its documentation). For printing a manual, the Texinfo to DVI route produces a much nicer manual than the HTML browser route. -- François Pinard http://pinard.progiciels-bpi.ca -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
[François Pinard]
I see two reasons for why one would want one bulky [HTML] page (I'm curious to know if there are other reasons):
Oh, I just thought of a third: because one wants to read all documentation by paging through it in the browser, from beginning to end, while they would have to click a lot more if one page per node. This is yet another limitation of Web browsers. "info" knows how to do such paging, through bunches of nodes, quite nicely. -- François Pinard http://pinard.progiciels-bpi.ca -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
François Pinard wrote:
[François Pinard]
I see two reasons for why one would want one bulky [HTML] page (I'm curious to know if there are other reasons):
Oh, I just thought of a third: because one wants to read all documentation by paging through it in the browser, from beginning to end, while they would have to click a lot more if one page per node.
This is yet another limitation of Web browsers. "info" knows how to do such paging, through bunches of nodes, quite nicely.
Which is why they should just use the damned "man" page format and stop using this annoying "info" format. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-12-14 at 10:31 -0500, François Pinard wrote:
Yes. Info pages are one by-product of Texinfo format, which also can produce laser-printable manuals, and HTML pages. At the very beginning, some people were writing Info pages directly, but it did not last. The proper way is writing Texinfo, and deriving Info out of it.
Which is why they are mostly not translated, ie, no localization effort. Not even "info info" is translated! At least, some man pages are translated. If you look under '/usr/share/info' there is only a 'de' directory, and the only app translated there is 'gcal'. Only one! If you instead look under '/usr/share/man' you see 'de,', 'es', 'fr, 'hu', 'it', 'ja', 'pl', 'pt_BR', 'ru', 'sr', 'sv'... - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHYqi5tTMYHG2NR9URAv5hAJ9Ujinto58f5geuVwOEFAzQH2pqgQCfXwYG nYeYZ9owUkNduYO+Gcrkkf8= =l6Zm -----END PGP SIGNATURE-----
On Fri, 2007-12-14 at 10:31 -0500, François Pinard wrote:
[Dave Howorth]
there are lots of websites that contain HTML-formatted man pages. Are there any sites that have HTML-formatted info pages (preferably all pages for one app on one HTML page :) ?
Yes
It's good to know that it's theoretically possible but it doesn't answer my question. "Are there any sites that have HTML-formatted info pages". Actually I suppose it does answer my question. Could I extend my question slightly and say "and what are the URLs of those sites, please?" :)
I see two reasons for why one would want one bulky page (I'm curious to know if there are other reasons): either because HTML browsers cannot conveniently search at once through a bunch of related pages, or else to print a manual in a single browser print request.
In my case, it's esentially the first reason. It is more convenient to me to have all the information in one place using facilities and key bindings that I am extremely familiar with and which provide external indexing capabilities that I use extensively and continually. I hardly ever use the man command and I never use *info. Cheers, Dave BTW, François, I don't need a second copy of your reply, thanks. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-12-14 at 16:28 -0000, Dave Howorth wrote:
It's good to know that it's theoretically possible but it doesn't answer my question. "Are there any sites that have HTML-formatted info pages".
Yes, localhost. ie, your own machine. You can tell konqueror to display tem for you. Or you can use apache, too: http://localhost/cgi-bin/info2html Want a remote site? Try "http://tldp.org/" or "http://www.gnu.org/". - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHYtK7tTMYHG2NR9URAruZAJ0Zz7x5b3Sfr7Eis1WMnYjpBrYBqwCfQ/5G KUf0Ii6maBpm6FZZDdwEDxI= =IT4j -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2007-12-14 at 20:00 +0100, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Friday 2007-12-14 at 16:28 -0000, Dave Howorth wrote:
It's good to know that it's theoretically possible but it doesn't answer my question. "Are there any sites that have HTML-formatted info pages".
Yes, localhost. ie, your own machine. You can tell konqueror to display tem for you. Or you can use apache, too:
Ah, thanks for that. It looks good but when I click on any link it says: File IO Error The Info file could not be opened for reading. Is that a subtle way of telling me I need to install some docs package, or a bug? Either way, it's an incentive to use an external site:
Want a remote site? Try "http://tldp.org/"
I use tldp quite often but don't remember seeing info pages there, and I can't find any now. Could you give me a more specific URL?
or "http://www.gnu.org/".
I guess you mean http://www.gnu.org/manual/. I've looked at the gnu site before and for some reason have never managed to find that page. Thanks for making me look again. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-12-14 at 19:42 -0000, Dave Howorth wrote:
Ah, thanks for that. It looks good but when I click on any link it says: File IO Error The Info file could not be opened for reading.
Me too... and it worked some time ago. I haven't investigated it yet [...] Apache error log says: [Sat Dec 15 01:40:47 2007] [error] [client 127.0.0.1] , referer: http://localhost/cgi-bin/info2html [Sat Dec 15 01:40:47 2007] [error] [client 127.0.0.1] File does not exist: /srv/www/htdocs/info2html.css, referer: http://localhost/cgi-bin/info2html?(enscript)Top It is "/srv/www/htdocs/info2html.css" that is missing. It has to be a bug, it is not included in the whole distro. Not even webpin finds it. :-/
Want a remote site? Try "http://tldp.org/"
I use tldp quite often but don't remember seeing info pages there, and I can't find any now. Could you give me a more specific URL?
Sorry, I prefer local pages to remote pages, so I don't have a "tested" link, but I though that the site would have them. My bad for not checking.
or "http://www.gnu.org/".
I guess you mean http://www.gnu.org/manual/. I've looked at the gnu site before and for some reason have never managed to find that page. Thanks for making me look again.
Yes, I was thinking of the manual link: obviously, they must have the documentation of their own programs :-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHYyRXtTMYHG2NR9URAlkjAKCHxI0fRLqlrsGb+/95YAR5RdskRgCfdDL4 Cm6j0RDt4PUawQIBOv0iOnM= =44LA -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 2007-12-15 at 01:48 +0100, Carlos E. R. wrote:
The Friday 2007-12-14 at 19:42 -0000, Dave Howorth wrote:
Ah, thanks for that. It looks good but when I click on any link it says: File IO Error The Info file could not be opened for reading.
Me too... and it worked some time ago. I haven't investigated it yet [...]
Apache error log says:
[Sat Dec 15 01:40:47 2007] [error] [client 127.0.0.1] , referer: http://localhost/cgi-bin/info2html [Sat Dec 15 01:40:47 2007] [error] [client 127.0.0.1] File does not exist: /srv/www/htdocs/info2html.css, referer: http://localhost/cgi-bin/info2html?(enscript)Top
It is "/srv/www/htdocs/info2html.css" that is missing. It has to be a bug, it is not included in the whole distro. Not even webpin finds it. :-/
That's just a CSS file. It doesn't stop things working and just touching the file makes that error go away. The real error is "" (after subracting the timestamp and the referer information. Really helpful! So at a minimum there's a bug in the info2html perl script's error handling and most likely either a bug in it's file handling or some packaging bug that means the config is inconsistent. If I cared about info, I might investigate :) Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
François Pinard wrote:
[Dave Howorth]
there are lots of websites that contain HTML-formatted man pages. Are there any sites that have HTML-formatted info pages (preferably all pages for one app on one HTML page :) ?
Yes. Info pages are one by-product of Texinfo format, which also can produce laser-printable manuals, and HTML pages. At the very beginning, some people were writing Info pages directly, but it did not last. The proper way is writing Texinfo, and deriving Info out of it.
In the tool generating HTML out of Texinfo, there are options for selecting one bulky HTML page, instead of one HTML per node. I see two reasons for why one would want one bulky page (I'm curious to know if there are other reasons): either because HTML browsers cannot conveniently search at once through a bunch of related pages, or else to print a manual in a single browser print request.
My primary reason is that I DO NOT WANT TO SPEND MY TIME NAVIGATING FROM NODE TO NODE trying to find where in the hell the particular documentation for a command has been hidden by the not-as-clever-as-they-think-themselves-to-be guys at FSF. Their programs are good. Their documentation format sucks.
I would think the above reasons come with HTML format. I remember that "info" knows to search through all nodes (a bit like Vim knows how to search in all its documentation). For printing a manual, the Texinfo to DVI route produces a much nicer manual than the HTML browser route.
I have no interest in printing out a manual. On the other hand, say when I'm using chmod(3) for some of its more esoteric purposes, I do have a very high interest in being able to find the relevant section of the documentation quickly, without being forced to hunt around for several minutes like a blind man in a maze. It's just fucking stupid. Other than that, gnu software is great. (And I find it very interesting that the man page for GCC is complete, without snide references to see the info page for the complete documentation.) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Dave Howorth wrote:
On Fri, 2007-12-14 at 14:46 +0100, Carlos E. R. wrote:
The Friday 2007-12-14 at 04:27 +0100, Stephan Hegel wrote:
Carlos E. R. wrote:
Forget 'info', use 'pinfo'. It is intuitive, uses colors, displays either man or info pages, depending on what it finds.... really nice. I've tried it. Surely better to operate than info, especially it has vi key bindings for basic operations. But how to search for keywords within all pages ? E.g. for "precision" in "pinfo bc". With "/" it seems it searches only in the currently displayed page. Unfortunately, you are right. ... There is time to learn new tricks ;-)
Speaking of which ... there are lots of websites that contain HTML-formatted man pages. Are there any sites that have HTML-formatted info pages (preferably all pages for one app on one HTML page :) ?
That's not easily done, because info isn't "flat" like man pages.
Cheers, Dave
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Linda Walsh wrote:
Aaron Kulkis wrote:
Randall R Schulz wrote:
On Tuesday 11 December 2007 02:32, Carlos E. R. wrote:
Both have good man pages. And "info" pages. Gack! WTF is with the FSF and their insistance on scrimping on the man pages, and only putting the detailed documentation in the info pages.
And worse, they're quite snide about it.
*snicker*... but but but...isn't it derived from the interface god dictated to Stallman for Emacs? Your words border on heresy!
which is fine if you like emacs. Personally, I find the emacs interface horrid. I migrated from two editors, screen editor (se) and ex to vi in the middle of a semester, and suffered no loss in productivity. I later tried to migrate from vi to emacs, and it was nothing but annoyance. Not because of reflexive use of vi key-usage, but because the emacs interface is just so... clumsy. control-meta-left_flipper-pinball_plunger....
As someone else mentioned, "pinfo", at least, has
That was me.
a bearable interface. Of course if you have a problem with the 'info' tool, you can always consult the 'info' page for info.... :-) (*sigh*) (not that I would agree with your sentiment or anything..:-))
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
One my 10.0 system: % while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:14 AM PST -0.877900 seconds Tue 11 Dec 2007 10:25:25 AM PST -0.988284 seconds Tue 11 Dec 2007 10:25:36 AM PST -0.983046 seconds
On my 10.3 system: % while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:16 AM PST -0.000481 seconds Tue 11 Dec 2007 10:25:26 AM PST -0.000754 seconds
They're running on completely different hardware, but both use NTP. Randall Schulz
Interesting -- using same version of "hwclock" & same kernel version, I compared 3 machines: one machine averaged around -0.988xxx, another -0.991xxx and a third at -0.0003xx. (the xxx digits are variable, the listed digits were mostly fixed values after the loop start). Their HW varies considerably, the first two about 5-6 years old, the latter more recent. I wonder why they cluster like they do -- the first two around -1, and the newer one nearer 0. Curious... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Linda Walsh wrote:
Randall R Schulz wrote:
One my 10.0 system: % while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:14 AM PST -0.877900 seconds Tue 11 Dec 2007 10:25:25 AM PST -0.988284 seconds Tue 11 Dec 2007 10:25:36 AM PST -0.983046 seconds
On my 10.3 system: % while true; do hwclock; sleep 10; done Tue 11 Dec 2007 10:25:16 AM PST -0.000481 seconds Tue 11 Dec 2007 10:25:26 AM PST -0.000754 seconds
They're running on completely different hardware, but both use NTP. Randall Schulz
Interesting -- using same version of "hwclock" & same kernel version, I compared 3 machines: one machine averaged around -0.988xxx, another -0.991xxx and a third at -0.0003xx. (the xxx digits are variable, the listed digits were mostly fixed values after the loop start).
Their HW varies considerably, the first two about 5-6 years old, the latter more recent. I wonder why they cluster like they do -- the first two around -1, and the newer one nearer 0.
Offset is probably correlated to latency of both data and interrupts (which get masked in certain critical sections of code in the kernel). The newer (faster) hardware has lower latency for both. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-12-12 at 09:54 -0800, Linda Walsh wrote:
Interesting -- using same version of "hwclock" & same kernel version, I compared 3 machines: one machine averaged around -0.988xxx, another -0.991xxx and a third at -0.0003xx. (the xxx digits are variable, the listed digits were mostly fixed values after the loop start).
Their HW varies considerably, the first two about 5-6 years old, the latter more recent. I wonder why they cluster like they do -- the first two around -1, and the newer one nearer 0.
I don't :-P They cluster because you are requesting the data in a programming loop, with a delay that is an integer number of seconds. Do a delay loop with a random number of a fraction of 1 second, and you will see the numbers come out equally random. Or do it manually (see below). Proof: nimrodel:~ # time hwclock --show ; date Wed Dec 12 21:09:03 2007 -0.275262 seconds real 0m0.284s <===== user 0m0.000s sys 0m0.000s Wed Dec 12 21:09:03 CET 2007 nimrodel:~ # time hwclock --show ; date Wed Dec 12 21:09:09 2007 -0.500613 seconds real 0m0.506s <===== user 0m0.003s sys 0m0.003s Wed Dec 12 21:09:09 CET 2007 See how the "real" time used by the command is curiously similar to the offset seconds of the hwclock command? Because hwclock simply waits that long before exiting, and exits at the exact moment the seconds is XX.00, reporting that time it waits as an offset. The offset is /not/ the offset between the cmos clock and the system clock...
Curious...
Satisfied, I hope ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHYEEstTMYHG2NR9URAiXcAKCIiA331Jfx2OcpMwhcOc4dueQ7fACfYkcj 8vooJF8vGDHripd2YRuYx5U= =6kEL -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (9)
-
Aaron Kulkis
-
Anders Johansson
-
Carl Hartung
-
Carlos E. R.
-
Dave Howorth
-
François Pinard
-
Linda Walsh
-
Randall R Schulz
-
Stephan Hegel