灯塔彭于晏 当前离线
一级士官
TOP
newswan 当前离线
上尉
netdzb 当前离线
qixiaobin0715 当前离线
大校
sed -n -r -e "/#/!p ; /#/ { N ; s'\n','g ; s',',,'g ; s'^|$','g ; s',[^#,]+,''g ; s',#|,$''g ; p}"复制代码
@echo off setlocal enabledelayedexpansion for /f "delims=" %%i in ('findstr /n .* test.txt') do ( set /a k+=1 set /a "n=(k-1)%%7+1" set "str=%%i" set "str=!str:*:=! if !n! lss 3 ( echo,!str! ) else if !n! gtr 4 ( echo,!str! ) else ( set m=100 for %%j in ("!str:,=","!") do ( set /a m+=1 set var=%%~j if "!var:~,1!"=="#" set -!m!=!var:~1! ) ) if !n! equ 4 ( for /f "tokens=1* delims==" %%a in ('set -') do ( set "str1=!str1!,%%b" set %%a= ) echo,!str1:~1! set str1= ) ) pause复制代码
评分人数