Combine output of two commands on single line

Posted on 2004-04-12
Medium Priority
Last Modified: 2013-12-26
I want to combine the output of two commands on a single line. The two commands are echo and uptime and I want the output to look like:

UPTIME: 03:32PM   up 35 days,  15:54,  208 users,  load average: 0.54, 0.45, 0.52

I have tried [echo "UPTIME: " | uptime], and [echo "UPTIME: " & uptime], etc. but, cannot get it work.

Question by:nevahj
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

fim32 earned 200 total points
ID: 10808001
how about:
echo uptime: `uptime`

Author Comment

ID: 10808055

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question