Solved

Windows Batch File - Combing output in a single line

Posted on 2016-09-19
3
84 Views
Last Modified: 2016-09-20
Hi there,

I am looking for a way to combine both output lines in a single line, and without using the FOR command.

I remember a long time ago, I think paultomasi or billprew did this but I don`t remember how.

Thanks and cheers,
Rene

@ECHO OFF
:Home
PING -n 1 192.168.1.1 | FINDSTR /i "statistics packets"
PING 192.168.11.0 /w 5000 /n 1 >NUL 2>&1
GOTO Home

Open in new window

0
Comment
Question by:ReneGe
[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
3 Comments
 
LVL 70

Accepted Solution

by:
Qlemo earned 500 total points
ID: 41805242
You remember half way correct. Suppressing the carriage return works only for string literals or variable substitution, but not for command results (hint: set /p ,=Text to display<nul).
You'll need the FOR, sorry. Or use an external tool. Or use PowerShell, which is my recommendation.
0
 
LVL 10

Author Closing Comment

by:ReneGe
ID: 41805308
Thanks mate :)
Cheers
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

729 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