Solved

Combine output of two commands on single line

Posted on 2004-04-12
2
223 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
2 Comments
 
LVL 7

Accepted Solution

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

Author Comment

by:nevahj
ID: 10808055
Thanks!!!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now