powershell:落書き2
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
powershell:落書き2 [2023/10/23 03:36] – 133.106.214.11 | powershell:落書き2 [2024/05/13 05:13] (現在) – 133.106.206.103 | ||
---|---|---|---|
行 15: | 行 15: | ||
</ | </ | ||
< | < | ||
- | while true ; do iperf3 -c www.taatin.info -p 5201 -i 1 -R -t 29; done | + | while true ; do iperf3 -c www.taatin.info -p 5201 -i 1 -R -t 299; done |
</ | </ | ||
行 57: | 行 57: | ||
$tcpClient.Close() | $tcpClient.Close() | ||
+ | |||
+ | |||
+ | |||
+ | --------- | ||
+ | < | ||
+ | # 入力ファイルと出力ファイルのパスを設定 | ||
+ | $inputPath = " | ||
+ | $outputPath = " | ||
+ | |||
+ | # 出力ファイルが既に存在する場合は削除 | ||
+ | if (Test-Path $outputPath) { | ||
+ | Remove-Item $outputPath | ||
+ | } | ||
+ | |||
+ | # 入力ファイルを読み込み、各行の最初の30文字を取得して出力ファイルに書き込む | ||
+ | Get-Content $inputPath | ForEach-Object { | ||
+ | $_.Substring(0, | ||
+ | } | Set-Content $outputPath | ||
+ | |||
+ | |||
+ | |||
+ | # 入力ファイルと出力ファイルのパスを設定 | ||
+ | $inputPath = " | ||
+ | $outputPath = " | ||
+ | |||
+ | # 出力ファイルが既に存在する場合は削除 | ||
+ | if (Test-Path $outputPath) { | ||
+ | Remove-Item $outputPath | ||
+ | } | ||
+ | |||
+ | # 前の行を記録する変数 | ||
+ | $previousLine = $null | ||
+ | |||
+ | # 入力ファイルを読み込み、各行の最初の30文字を取得し、連続する重複行を排除して出力ファイルに書き込む | ||
+ | Get-Content $inputPath | ForEach-Object { | ||
+ | $currentLine = $_.Substring(0, | ||
+ | if ($currentLine -ne $previousLine) { | ||
+ | $currentLine | ||
+ | } | ||
+ | $previousLine = $currentLine | ||
+ | } | Set-Content $outputPath | ||
+ | |||
+ | </ |
powershell/落書き2.1698032191.txt.gz · 最終更新: 2023/10/23 03:36 by 133.106.214.11