Sponsored Content
Full Discussion: GeekTool
Top Forums UNIX for Dummies Questions & Answers GeekTool Post 302189571 by MastaFue on Saturday 26th of April 2008 01:54:59 PM
Old 04-26-2008
GeekTool

Hello to whoever is reading this!

I try to display my uptime on my desktop with a program called GeekTool.
For that purpose I use this command

uptime | awk '{print "Uptime : " $3 " " }'

So it looks like this

Uptime : 3:01,


My first question is how to remove the comma behind the uptime. And my second question how can I add an 'h' behind the hour digit and a 'min' behind the minutes.

Thank you for your help in advance!
 

We Also Found This Discussion For You

1. UNIX for Dummies Questions & Answers

geekTool

Hello! Here is my problem: I try to display the uptime of my computer on my desktop with the help of a tool called GeekTool (for Mac). I want the uptime output to look like that: x day(s) y h z min (but if the pc is only running e.g for several minutes it should leave out the day and the... (1 Reply)
Discussion started by: MastaFue
1 Replies
uptime(1)							   User Commands							 uptime(1)

NAME
uptime - show how long the system has been up SYNOPSIS
uptime DESCRIPTION
The uptime command prints the current time, the length of time the system has been up, and the average number of jobs in the run queue over the last 1, 5 and 15 minutes. It is, essentially, the first line of a w(1) command. EXAMPLES
Below is an example of the output uptime provides: example% uptime 10:47am up 27 day(s), 50 mins, 1 user, load average: 0.18, 0.26, 0.20 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
w(1), who(1), whodo(1M), attributes(5) NOTES
who -b gives the time the system was last booted. SunOS 5.10 18 Mar 1994 uptime(1)
All times are GMT -4. The time now is 11:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy