Wensi Peng wrote:
> I was asking a general question fro appending characters. It is independent
> on any specifical commands.
>
> Thanks,
> Wensi
- - - - - - - - - - begin screen capture WinXP - - - - - - - - - -
C:\cmd>demo\AppendingText
my_variable is [This is some text ]
my_variable is [This is some text and this is appended.]
C:\cmd>rlist demo\AppendingText.cmd
=====begin C:\cmd\demo\AppendingText.cmd ====================
1. @echo off
2. setlocal
3. set "my_variable=This is some text "
4. echo my_variable is [%my_variable%]
5. set my_variable=%my_variable% and this is appended.
6. echo my_variable is [%my_variable%]
=====end C:\cmd\demo\AppendingText.cmd ====================
- - - - - - - - - - end screen capture WinXP - - - - - - - - - -
> "Jerold Schulman" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>>On Sat, 15 Jan 2005 12:39:50 -0500, "Wensi Peng" <(E-Mail Removed)>
>
> wrote:
>
>>>Hello,
>>>
>>>I have leaned here how to add characters in front of a line by SET /P.
>>>Today I would like to ask how to append characters in a line?
>>>
>>>Example:
>>>
>>>original output:
>>>
>>>IP: 10.1..1.1
>>>IP: 10.1.1.2
>>>..........
>>>IP: 10.1.1.n
>>>
>>>Now I want to append vendor name, for instance
>>>
>>>IP: 10.1..1.1 IBM server
>>>IP: 10.1.1.2 HP server
>>>..........
>>>IP: 10.1.1.n DELL server
>>>
>>>Thanks,
>>>Wensi
>>>
>>
>>for /f "Tokens=1,2" %%a in ('type filename') do (
>> "%commonProgramFiles%\Microsoft Shared\msinfo\MSINFO32.EXE" /computer %%b
>
> /categories systemsummary /report "%TEMP%\MSINFO.TMP"
>
>>:: parse the "%TEMP%\MSINFO.TMP" and extract the Manufacturer and OS
>
> type.
>
>>)
>>
>>
>>
>>Jerold Schulman
>>Windows Server MVP
>>JSI, Inc.
>>http://www.jsiinc.com
>
>
>
--
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l