|
rubik
初级用户
 
积分 102
发帖 35
注册 2006-3-16
状态 离线
|
『楼 主』:
怎么进行大小写转换?
使用 LLM 解释/回答一下
比如 用 set /p 得到了一个变量
想把变量的值无条件转换为大写,咋整?
For example, if you get a variable using set /p, how to unconditionally convert the value of the variable to uppercase?
|
|
2006-4-13 13:09 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
用26个命令:
set var=%var:a=A%
set var=%var:b=B%
...
set var=%var:z=Z%
可以实现楼主的功能。我只有这种笨办法了。
Using 26 commands:
set var=%var:a=A%
set var=%var:b=B%
...
set var=%var:z=Z%
Can achieve the function of the original poster. I only have this clumsy way.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2006-4-13 17:38 |
|
|
rubik
初级用户
 
积分 102
发帖 35
注册 2006-3-16
状态 离线
|
|
2006-4-13 23:17 |
|
|
smileseeker
中级用户
  
积分 316
发帖 83
注册 2005-3-1
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
不知道有没有什么小软件可以实现整个文挡大小写转换
I don't know if there are any small software that can realize the conversion of the case of the entire document
|
|
2006-4-14 17:19 |
|
|
DOSforever
金牌会员
     
积分 4639
发帖 2239
注册 2005-1-30
状态 离线
|
|
2006-4-14 17:40 |
|
|
无奈何
荣誉版主
      
积分 1338
发帖 356
注册 2005-7-15
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
TO smileseeker
GNU sed 可以很方便的将文件进行大小写转换。
小写:sed "s/\(.*\)/\L\1/" file.txt
大写:sed "s/\(.*\)/\U\1/" file.txt
sed 下载地址: http://www.student.northpark.edu/pemente/sed/gsed407x.zip
TO smileseeker
GNU sed can conveniently convert the case of files.
Lowercase: sed "s/\(.*\)/\L\1/" file.txt
Uppercase: sed "s/\(.*\)/\U\1/" file.txt
sed download address: http://www.student.northpark.edu/pemente/sed/gsed407x.zip
|

☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul
|
|
2006-4-14 20:07 |
|
|
smileseeker
中级用户
  
积分 316
发帖 83
注册 2005-3-1
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
多谢了
小弟先试用看看
Thanks a lot.
The younger brother will first try it out.
|
|
2006-4-15 08:20 |
|
|
HUNRYBECKY
银牌会员
    
积分 1179
发帖 442
注册 2006-9-9
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
最近发现WINRAR的DOS版本RAR具有这个功能 ,参数是rar -cl 转化为大写 rar -cu可以转化为小写
Recently, I found that the DOS version of WINRAR, RAR, has this function. The parameters are rar -cl to convert to uppercase and rar -cu to convert to lowercase.
|
|
2007-1-25 06:01 |
|
|
simazhuo
新手上路

积分 1
发帖 2
注册 2006-12-31
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
谢谢楼上的分享了!
Thanks for the share from the person above!
|
|
2007-1-25 11:14 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
Originally posted by HUNRYBECKY at 2007-1-24 17:01:
最近发现WINRAR的DOS版本RAR具有这个功能 ,参数是rar -cl 转化为大写 rar -cu可以转化为小写
这个只能转换文件名的大小写,并不能将文件内容批量转化为大小写吧?
Originally posted by HUNRYBECKY at 2007-1-24 17:01:
Recently, I found that the DOS version of WINRAR, RAR, has this function. The parameters are rar -cl to convert to uppercase and rar -cu to convert to lowercase.
This can only convert the case of file names, and cannot batch convert the content of files to uppercase or lowercase, right?
|
|
2007-1-25 12:12 |
|