I want to prompt the user for some input detail, and then use it later as a command line argument.
相关问题
- xcopy include folder
- Batch file if string starts by
- Jenkins - cmd is not recognized
- Does specifying the encoding in javac yield the sa
- Jasper: error opening input stream from url
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- 放在input的text下文本一直出现一个/(即使还没输入任何值)是什么情况
- Show a different value from an input that what wil
- Is there a way to hide the new HTML5 spinbox contr
- Extracting columns from text file using Perl one-l
- Programmatically interrupting raw_input
- Bootstrap input field inside tooltip popover remov
- ValueError: too many values to unpack (expected 2)
A rather roundabout way, just for completeness:
Of course that requires ^Z as a terminator, and so the Johannes answer is better in all practical ways.
You can use
set
with the/p
argument:So, simply use something like
Later you can use that variable as argument to a command:
Be careful though, that if your input might contain spaces it's probably a good idea to quote it: