Woody und "cat" - Frage

Florian Lohoff flo at rfc822.org
Sat May 4 18:51:03 CEST 2002


On Sat, May 04, 2002 at 06:39:27PM +0200, Martin Heggemann wrote:
> SECONDS=`cat /proc/uptime`
> echo "Uptime: $SECONDS"
> ich at server2:~$
> 
[...]
> Uptime: 0
> ich at server2:~$
> 

Man sollte keine bash internals benutzen:

man bash

       SECONDS
              Each  time this parameter is referenced, the number
              of seconds since shell invocation is returned.   If
              a  value is assigned to SECONDS, the value returned
              upon subsequent references is the number of seconds
              since  the  assignment plus the value assigned.  If
              SECONDS is unset, it loses its special  properties,
              even if it is subsequently reset.

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-5201-669912
                        Heisenberg may have been here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20020504/8cf74182/attachment.sig>


More information about the Linux mailing list