|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi all
I am not sure this is OT Is there a way to concatenate the output from two commands into a single line in a batch file? Something like echo A <concatenate> echo B >> file.txt that would create one line AB instead of two lines A B in file.txt? Thanks BTW I could not find a dos-shell NG... obsolete? :-) |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Nov 16, 6:57 pm, ned <n...@nospam.com> wrote:
> Hi all > > I am not sure this is OT > > Is there a way to concatenate the output from two commands into a single > line in a batch file? > > Something like > > echo A <concatenate> echo B >> file.txt > > that would create one line > > AB > > instead of two lines > > A > B > > in file.txt? > > Thanks > > BTW I could not find a dos-shell NG... obsolete? :-) There is no easy way to concatenate lines in batch - though it can be done, just not easily. One place to get with this is alt.msdos.batch/nt Tom Lavedas =========== http://members.cox.net/tglbatch/wsh/ |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Are you really needing to get things done on one line, or do you need to
save output from two different commands to the same file? DIR %temp% > file.txt Ping localhost >> file.txt Maybe a bit more background on the actual commands you're trying to work with will . -- Jeffery Hicks Microsoft PowerShell MVP http://www.scriptinganswers.com http://www.powershellcommunity.org Now Available: WSH and VBScript Core: TFM Coming Soon: Windows PowerShell: TFM 2nd Ed. "Tom Lavedas" <tglbatch@cox.net> wrote in message news:1a6152aa-78ba-40aa-b133-6fc6615f5f4f@a28g2000hsc.googlegroups.com... > On Nov 16, 6:57 pm, ned <n...@nospam.com> wrote: >> Hi all >> >> I am not sure this is OT >> >> Is there a way to concatenate the output from two commands into a single >> line in a batch file? >> >> Something like >> >> echo A <concatenate> echo B >> file.txt >> >> that would create one line >> >> AB >> >> instead of two lines >> >> A >> B >> >> in file.txt? >> >> Thanks >> >> BTW I could not find a dos-shell NG... obsolete? :-) > > There is no easy way to concatenate lines in batch - though it can be > done, just not easily. > > One place to get with this is alt.msdos.batch/nt > > Tom Lavedas > =========== > http://members.cox.net/tglbatch/wsh/ |
|
![]() |
| Outils de la discussion | |
|
|