这有效:
wsl
cat * | sort | uniq
但这似乎随机地提前停止了:
wsl cat * | wsl sort | wsl uniq
这是一个错误吗?我做错了什么吗?
这有效:
wsl cat * | wsl sort >temp
wsl uniq <temp
但这又随机提前停止了:
wsl cat * >temp
wsl sort <temp | wsl uniq
该问题似乎仅出现在“许多”(例如 100 个)“大”(例如 300 行,每行 50 个字符)文本文件中。
例如,此.bat
文件可用于创建*
触发问题的文件:
@echo off
echo "See a pin and pick it up, and, all day long, you'll have a pin." > data.txt
FOR /L %%j IN (1,1,3) DO (
FOR /L %%k IN (1,1,100) DO (
echo "Sooner or later all things are numbers, yes? %%k" >> data.txt
)
)
FOR /L %%i IN (1,1,100) DO (
copy data.txt data%%i.txt
)