?
Solved

Combine output of two commands on single line

Posted on 2004-04-12
2
Medium Priority
?
230 Views
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.

Thanks,
Charles
0
Comment
Question by:nevahj
[X]
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
2 Comments
 
LVL 7

Accepted Solution

by:
fim32 earned 200 total points
ID: 10808001
how about:
echo uptime: `uptime`
0
 
LVL 2

Author Comment

by:nevahj
ID: 10808055
Thanks!!!
0

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