Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Uptime Formated

Posted on May 9, 2017 By David Kittell

If you simply want uptime formatted this small script will help.

uptime | awk -F'( |,|:)+' '{print $6,$7",",$8,"hours,",$9,"minutes."}'

Uptime by itself will display similar to:
20:25:48 up 3 days, 8:14, 1 user, load average: 2.07, 2.17, 2.35

Formatted using the code above will display similar to:
3 days, 8 hours, 15 minutes.

All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

CentOS Code Fedora Red Hat Ubuntu UNIX UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

VB.Net – Get File Size / Free Space / Total Space

Posted on December 14, 2013September 2, 2019

Private Function GetFileSize(ByVal MyFilePath As String) As Long Dim MyFile As New FileInfo(MyFilePath) Dim FileSize As Long = MyFile.Length Return FileSize End Function Public Function GetFreeSpace(ByVal Drive As String) As Long Dim lBytesTotal, lFreeBytes, lFreeBytesAvailable As Long Dim iAns As Long iAns = GetDiskFreeSpaceEx(Drive, lFreeBytesAvailable, lBytesTotal, lFreeBytes) If iAns >…

Read More

TeamCity – Mac Agent Install

Posted on February 2, 2016May 6, 2016

This is a work in progress at the moment. Start by opening Terminal cd ~/Downloads curl -o TeamCity-Agent.tar.gz ‘https://download.jetbrains.com/teamcity/TeamCity-9.1.6.tar.gz’ If your network has a problem with SSL certificates you can try this command to download without checking the SSL certification. This is typically not suggested. cd ~/Downloads curl -k -o…

Read More

XML Reader

Posted on October 15, 2013October 26, 2015

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Xml; using System.IO; namespace XMLReader1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { string xmlString = "04228911.xml"; XmlDocument doc = new XmlDocument(); doc.Load(@xmlString);…

Read More

Code

Top Posts & Pages

  • PowerShell - Change Windows CD/DVD Drive Letter
  • Bleaching Wool using Hydrogen Peroxide
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - Disable Auto Run In Windows
  • MacOSX Terminal - Convert P7B Certificate to PEM/CER Certificate

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Change Windows CD/DVD Drive Letter
  • Bleaching Wool using Hydrogen Peroxide
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - Disable Auto Run In Windows
  • MacOSX Terminal - Convert P7B Certificate to PEM/CER Certificate
  • Get Windows Shortcut (.lnk) Details
©2025 David Kittell | WordPress Theme by SuperbThemes
David Kittell
  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support