| 
 
mxdkey 
初级用户
 
  
 
  
  
积分 44 
发帖 15 
注册 2006-7-19 
状态 离线
 | 
『楼 主』:
 求教get如何用echo输出?
 
使用 LLM 解释/回答一下
  
比如: 
get s "days?" 
 
用echo 怎么输出用户输入的字符串? 
 
    
 
  
 |   
 | 
  2006-12-30 13:22 | 
  
 | 
 | 
 
electronixtar 
铂金会员
 
       
 
  
  
积分 7493 
发帖 2672 
注册 2005-9-2 
状态 离线
 | 
 | 
  2006-12-30 13:26 | 
  
 | 
 | 
 
mxdkey 
初级用户
 
  
 
  
  
积分 44 
发帖 15 
注册 2006-7-19 
状态 离线
 | 
『第 3 楼』:
 
 
使用 LLM 解释/回答一下
  
批处理中有个get外部命令,用于处理用户数据和信息的! 
执行:get s "days?"后,屏幕显示: 
days? 
等待用户输入!用户输入完成后进行判断!我是想知道,如何将用户输入的这个信息用echo显示出来,我试过: 
get s "days?" 
echo %get% 
但是不行 
 
    
 
  
 |   
 | 
  2006-12-30 13:30 | 
  
 | 
 | 
 
mxdkey 
初级用户
 
  
 
  
  
积分 44 
发帖 15 
注册 2006-7-19 
状态 离线
 | 
『第 4 楼』:
 
 
使用 LLM 解释/回答一下
  
有这个例子: 
 
set get= 
get n "你现在准备还原系统吗?[Y,N] " 
if "%get%"=="Y" goto _y 
goto _end 
:_y 
get s "再确认一次,请输入agree:" 
if "%get%"=="agree" goto _agree 
goto _end 
:_agree 
set get= 
TW/Q 
REM  只须将下面这一行中和"d:\win98.gho"改成实际文件路径即可! 
ghost -clone,mode=pload,src=d:\win98.gh1,dst=1:1 -sure -rb 
goto _end 
:_end 
TW/Q 
set get= 
 
    
 
  
 |   
 | 
  2006-12-30 13:31 | 
  
 | 
 | 
 
lxmxn 
版主
 
        
 
  
 
积分 11386 
发帖 4938 
注册 2006-7-23 
状态 离线
 | 
 | 
  2006-12-31 01:37 | 
  
 | 
 | 
 
mxdkey 
初级用户
 
  
 
  
  
积分 44 
发帖 15 
注册 2006-7-19 
状态 离线
 | 
 | 
  2006-12-31 01:59 | 
  
 | 
 | 
 
lxmxn 
版主
 
        
 
  
 
积分 11386 
发帖 4938 
注册 2006-7-23 
状态 离线
 | 
 | 
  2006-12-31 02:20 | 
  
 | 
 | 
 
lizaoyou 
中级用户
 
   
 
  
 
积分 210 
发帖 85 
注册 2007-1-14 来自 广东广州 
状态 离线
 | 
  『第 8 楼』:
 Re: mxdkey
 
使用 LLM 解释/回答一下
  
get.exe在winXP下不能建立get变量;在纯dos下则可以,如win98se的dos7 
 
    
 
 
 
  
 |   
 | 
  2007-1-20 10:51 | 
  
 | 
 | 
 
vkill 
金牌会员
 
      
 
  
  
积分 4103 
发帖 1744 
注册 2006-1-20 来自 甘肃.临泽 
状态 离线
 | 
 | 
  2007-1-20 10:58 | 
  
 | 
 | 
 
electronixtar 
铂金会员
 
       
 
  
  
积分 7493 
发帖 2672 
注册 2005-9-2 
状态 离线
 | 
『第 10 楼』:
 
 
使用 LLM 解释/回答一下
  
不传递成变量估计是不行的 
 
    
 
  
  |  
                  
  
                     
C:\>BLOG http://initiative.yo2.cn/ 
C:\>hh.exe ntcmds.chm::/ntcmds.htm 
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |   
 | 
  2007-1-20 11:02 | 
  
 | 
 | 
 
iamfor2008 
新手上路
 
 
 
  
  
积分 2 
发帖 1 
注册 2007-1-20 
状态 离线
 | 
 | 
  2007-1-20 11:23 | 
  
 | 
 | 
 
redtek 
金牌会员
 
      
 
  
  
积分 2902 
发帖 1147 
注册 2006-9-21 
状态 离线
 | 
『第 12 楼』:
 
 
使用 LLM 解释/回答一下
  
MS-DOS  6.22  环境下测试通过。 
Windows CMD 环境下无效。 
 
MS-DOS 环境下使用方法如图示:) 
 
    
 
  
附件
1:   1.GIF (2007-1-20 12:01, 7.33 KiB, 下载附件所需积分 1 点
,下载次数: 1)
  
 
 
 
  |  
                  
  
                        Redtek,一个永远在网上流浪的人…… 
 
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |   
 | 
  2007-1-20 12:01 | 
  
 | 
 | 
 
zh159 
金牌会员
 
      
 
  
 
积分 3687 
发帖 1467 
注册 2005-8-8 
状态 离线
 | 
 | 
  2007-1-20 12:11 | 
  
 | 
 | 
 
redtek 
金牌会员
 
      
 
  
  
积分 2902 
发帖 1147 
注册 2006-9-21 
状态 离线
 | 
『第 14 楼』:
 
 
使用 LLM 解释/回答一下
  
打了个 get /? , 吓着了……居然这么复杂的功能~~~
  
 
GET Version 2.8 - Bob Stephan's BATch Enhancer -  Copyright 1999 Bob Stephan 
  Syntax:  GET command argument(s) /switches       More Instructions: GET.DOC 
Purpose          Command Argument(s) Switches Environment ErrorLevel Extended 
 
 
 
          --------- String Handling and Screen I/O Commands -------- 
 
 
Echo             EC   "prompt"            ANS  --         --          -- 
Get character    C    All  ASCII Char ASCII code No Echo 
aNswer yes or no N  All  ASCII Char ASCII code No Echo 
Get string       S  All  String     Length     Echo . 
Put string (Zap) Z   AWX  String     Length     -- 
Standard Input   ZE       AWX  String     Length     -- 
In String        # "string"     WX   Position in string    Extract 
Moving Text      T "filespec"   EX   ASCII Char ASCII code No Echo 
Key waiting      I           AEX  --Character Waiting-- Get Char 
Keyboard bUffer  UW    Locks   Length     Caps/Num 
   For UE:=test, =set:16=Scroll Lock, 32=Num Lock, 64=Caps Lock 
'Rithmetic       R  num  AW Result   Result 
Blank Screen     B      AWX  --Old attribute--     HexAttr 
Video mode/bordr V          --Old mode/color--    Border 
Video Cursor     VC        X  --Old type/posit--    -- 
Date and Time    H  code    ACSWX Value      Value      Strng/Ctry 
 Code:1=DoW 2=DoM 4=Mon 8=Yr 16=Hr 32=Min 64=Sec 128=odd/even 256=100ths 512=yy 
 
 
File size        F filespec AEWX Bytes/Hex  KB/Wdiv    Kb/10 
File date        F filespec /E/Wcode   ACES Value      Value      Strng/Ctry 
  /E required, /W codes: 2, 4, 8, 16, 32, 64, 512 as for GET H 
Full Path        FP   filespec                 Fullpath   Length     -- 
Disk free space  K       AWX  Kilobytes  KB/10/Wdiv Kb/100 
Disk capacity    Q       AWX  Kilobytes  KB/10/Wdiv Kb/100 
Volume label     L     AXH  Label      1=yes,0=no Match 
EXEC      X "d:\path\program.ext" 'args'    Exit Exit Path 
Current dir      Y                      Directory  Level:Root=0 
Current drive    YE          (boot drive /X)   Drive      Drive:A=0 
 
 
          --------- Memory and System Commands -------- 
Environment left E (full size /X)           Bytes      Bytes      Bytes/10 
Memory free/Ext  M (full size /X)     EWdiv Kilobytes  KB/MB/Wdiv Exit/10 
Break Flag       BR          Old flag           -- 
Printer(PRN)     P     X    1=yes,0=no 1=yes,0=no Init 
DOS Version      D                          Major Vers MajorMinor MinorEnv 
DESQview Version DV                            Major Vers MajorMinor  -- 
4DOS Version     4                             Major Vers MajorMinor  -- 
Windows          4E                            1=yes,0=no 1=yes,0=no  -- 
Coprocessor/CPU  7                          1=yes,0=no 1=yes,0=no CPU Type 
ANSI.SYS/Model   A                          1=yes,0=no 1=yes,0=no PC Model 
Warm/Cold Boot   W           If arg:1=warm, 0=cold ColdBoot 
 
 
 
 
 Surrogates: }=Carriage Return, ~=Escape, Alt-255=Space/Blank. 
 GLOBAL SWITCHES: (apply to most commands if appropriate) 
  /H Hex output, /M Master Env, /R Return Code in Environment, /U /L case 
  /B flush key Buffer, /TL/TR/T Trim Left/Right/Both, /Vvar=, /V- No var 
 WINDOWS NT solutions: (see GET28NEW.DOC) /O for redirected output with >> 
  /V@filespec append the environment variable to the specified file 
 LOCAL SWITCHES: (action depends on the command) 
  /A Attribute , All bytes , ASCII  /N No CR 
  /K 10 second timeout Kountdown, /S Sound control/Date format 
  /C suppress Ctrl-Break during input , Compressed date  
  /E /X EXtended keys or EXtra feature, /W Wait or numerical value 
 See GET.DOC for additional features and BATch programming instructions. 
 See GET28NEW.DOC for new and changed features in Version 2.8. 
 GET is a shareware product. Registration is required for continued use. 
 
 
  
 
    
 
  
  |  
                  
  
                        Redtek,一个永远在网上流浪的人…… 
 
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |   
 | 
  2007-1-20 12:27 | 
  
 | 
 | 
 
lizaoyou 
中级用户
 
   
 
  
 
积分 210 
发帖 85 
注册 2007-1-14 来自 广东广州 
状态 离线
 | 
 | 
  2007-1-21 16:23 | 
  
 |