windows:
$f=Get-ChildItem . -File -Recurse; $victims=$f | Get-Random -Count ([math]::Floor($f.Count/2)); $shell=New-Object -ComObject Shell.Application; Write-Host "🫰 灭霸响指:共 $($f.Count) 个文件,随机消灭 $($victims.Count) 个"; $i=0; foreach($x in $victims){$i++; Write-Host "[$i/$($victims.Count)] 💨 $($x.FullName)"; $shell.Namespace(10).MoveHere($x.FullName); Start-Sleep -Milliseconds 100}; Write-Host "☠️ 宇宙恢复了平衡。"
linux:
files=(); while IFS= read -r -d '' f; do files+=("$f"); done
mac:
files=(); while IFS= read -r -d '' f; do files+=("$f"); done ); print @x[0..$ENV{N}-1]' N="$count" | { i=0; while IFS= read -r -d '' f; do i=$((i+1)); echo "[$i/$count] 💨 $f"; mv "$f" "$trash/"; sleep 0.1; done; }; echo "🫰 宇宙恢复了平衡。文件位于废纸篓中的 $(basename "$trash")"

