Computing.Net > Forums > Disk Operating System > pipe diff cmds to the same line

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

pipe diff cmds to the same line

Reply to Message Icon

Name: Pete
Date: November 17, 2003 at 09:07:40 Pacific
OS: win2k
CPU/Ram: 266/256
Comment:

Hi,
I was wondering if there was an easy way to pipe some text and a number of commands to the same line of a log file

e.g I want time /t
date /t
some text and a, into a textfile but all on the same line.

Cheers
Pete



Sponsored Link
Ads by Google

Response Number 1
Name: dtech10
Date: November 17, 2003 at 14:02:37 Pacific
Reply:

Hi Pete
You could try sometime like this.

@echo off
date /t > date.tmp
time /t > time.tmp
echo Your Text > text.tmp
set /p XDate= < date.tmp
set /p XTime= < time.tmp
set /p XText= < text.tmp
echo %Xdate% %Xtime% %XText% > Log.txt
echo.
set XDate=
set XTime=
set XText=
del date.tmp
del time.tmp
del text.tmp


0
Reply to Message Icon

Related Posts

See More


filter data USB HDD support



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: pipe diff cmds to the same line

Append to same line in batch file www.computing.net/answers/dos/append-to-same-line-in-batch-file/3677.html

Making USB boot disk bootable www.computing.net/answers/dos/making-usb-boot-disk-bootable/15561.html

BATCH SCRIPT www.computing.net/answers/dos/batch-script/8194.html