关于 PowerShell, Bash 命令 多参数换行问题
1. PowerShell 命令参数过长换行 demo [直接在PowerShell 客户端中运行]
.\subspace-farmer-windows-x86_64-skylake-gemini-3h-2024-mar-25.exe ` farm --reward-address st7KWHjV2EGwbcYgsYM4jxJjQ6CKUVgMn3C9FFFCohT1fmJfB ` path=D:\working\Pow\subspace\farm,size=100G ` path=D:\working\Pow\subspace\farm2,size=100G
注意:PowerShell 换行 符为 `
1-1:Bat 命令参数过长换行 符 ^
@echo off .\client.exe -c 15 -s . -w 001 ^ -d "D:\working\Pow\nossd-chia\FARM" ^ -d "D:\working\Pow\nossd-chia\FARM2" --no-benchmark --no-mining --no-finalizing --no-temp
2.Bash 脚本 中的 参数过换行
2-0 : nohup 后台运行 ,输出到日志文件和标准输出
nohup ./subspace-farmer-ubuntu-x86_64-skylake-gemini-3h-2024-mar-14 farm --reward-address st7KWHjV2EGwbcYgsYM4jxJjQ6CKUVgMn3C9FFFCohT1fmJfB \ path="/home/tuoluo/ssd0/farm",size=950G \ path="/home/tuoluo/ssd1",size=1.8T \ path="/home/tuoluo/ssd2",size=1.8T \ > subspace-farm-out.log 2>&1 &
2-1: screen 后台会话模式运行
screen -dmS spc-farm ./subspace-farmer-ubuntu-x86_64-skylake-gemini-3h-2024-mar-14 farm --reward-address st7KWHjV2EGwbcYgsYM4jxJjQ6CKUVgMn3C9FFFCohT1fmJfB \ path="/home/tuoluo/ssd0/farm",size=950G \ path="/home/tuoluo/ssd1",size=1.8T \ path="/home/tuoluo/ssd2",size=1.8T
注意:换行 符为 \
3.bat脚本 调起 powershell,并调起第三方exe,且输入 yes 后 回车
@echo off start powershell -NoExit -Command "cd 'D:\working\Pow\smh\windows'; echo yes |.\h9-miner-spacemesh-console.exe -gpuServer; echo ."
4.bat 调起 第三方exe 且输入 yes后回车
@echo off d: cd D:\working\Pow\smh\windows echo yes| h9-miner-spacemesh-console.exe echo.