wangdao6699 当前离线
一级士官
DAIC 当前离线
中将
sed "s/|/\n/g" 1.txt > 2.txt复制代码
评分人数
TOP
pcl_test 当前离线
荣誉版主
@echo off set str="69|8569|986|456|678|6898" set "str=%str:|=,%" for %%i in (%str:~1,-1%) do echo %%i pause复制代码
@echo off set str="69|8569|986|456|678|6898" for /l %%a in (1 1 6) do call :loop %%a %str% pause :loop for /f tokens^=%1^ delims^=^| %%i in (%2) do echo %%i goto :eof复制代码
cobat 当前离线
三级士官
@echo off set "s=69|8569|986|......" echo,%s:|=&echo,% pause复制代码
@echo off&setlocal enabledelayedexpansion set "s=69|8569|986|......" echo,!s:^|=^ !&pause复制代码
'&cls&@echo off&cscript -nologo -e:vbscript %~fs0 & pause & exit /b str="69|8569|986|456|678|6898" WScript.echo replace(str,"|",chr(10))复制代码
echo '69|8569|986|456|678|6898' | %{Write-Host $_.Replace("|","`n")}复制代码
bailong360 (zhonghua)当前离线
上尉
@gawk -F "|" "for(i=1;i<=NF;i++) print $i>$New.txt" file.txt 复制代码
@grep -oP "\d+" file.txt>$New.txt复制代码