- dir /b /a-d *.txt | sed -r "/[0-9]/!d; s/[^0-9]+//g"
复制代码
- dir /b /a-d *.txt | gawk "/[0-9]/{gsub(/[^0-9]+/, \"\");print}"
复制代码
- PowerShell "(dir *[0-9]*.txt -File).BaseName -replace '\D+'"
复制代码
- @if(0)==(0) echo off
- dir /b /a-d *.txt | cscript //nologo //e:jscript "%~f0"
- pause & exit
- @end
-
- while (!WSH.StdIn.AtEndOfStream) {
- var s = WSH.StdIn.Readline().replace(/\D+/g, '');
- if (/./.test(s)) WSH.Echo(s);
- }
复制代码
|