Json Windows命令类型引号中的关键字
我试图在Windows命令行中传递TYPE关键字来读取文件并在参数中输出其内容 我想将“state machine.json”的内容读入我的字符串。。。有了bash,我知道我可以使用:Json Windows命令类型引号中的关键字,json,windows,cmd,command-line,Json,Windows,Cmd,Command Line,我试图在Windows命令行中传递TYPE关键字来读取文件并在参数中输出其内容 我想将“state machine.json”的内容读入我的字符串。。。有了bash,我知道我可以使用: aws步骤函数--端点http://localhost:8083 创建状态机--定义“$(cat./step function/state machine.json)” 但是,我无法理解Windows的等效功能: aws步骤函数--端点http://localhost:8083 创建状态机——定义“@(类型。/
aws步骤函数--端点http://localhost:8083 创建状态机--定义“$(cat./step function/state machine.json)”
但是,我无法理解Windows的等效功能:
aws步骤函数--端点http://localhost:8083 创建状态机——定义“@(类型。/step函数/state machine.json)”
是“@(type./step function/state machine.json)”应该是powershell命令吗
$StateMachine=gc "path-to\state-machine.json"
aws stepfunctions --endpoint http://localhost:8083 create-state-machine --definition "@("$StateMachine")"
使用以下方法解决了我的问题:
创建状态机--定义file://step-function/state-machine.json
如果您在问题中加入state-machine.json的内容,可能会有所帮助。“@(type./step function/state machine.json)”
应该是powershell命令吗?@somebad它只是我想从文件中提取的json字符串。类型是一个命令:您是否正在尝试使用powershell执行此操作?你试过我的答案了吗?