Solved

Windows Batch File - Combing output in a single line

Posted on 2016-09-19
3
69 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
3 Comments
 
LVL 69

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

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

This article will show, step by step, how to integrate R code into a R Sweave document
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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