Che*_*riy 7 command-line files console
使用从文本文件提供的输入参数运行控制台应用程序的命令行是什么?
text_file:
This is a simple text file with characters and other
symbols including tabs and new lines
Run Code Online (Sandbox Code Playgroud)
控制台应该得到
$./myapp "This is a simple text file with characters and other symbols including tabs and new lines"
Run Code Online (Sandbox Code Playgroud)
Eri*_*lho 11
./myapp `cat text_file`
Run Code Online (Sandbox Code Playgroud)
或者
./myapp $(cat text_file)
Run Code Online (Sandbox Code Playgroud)
或者使用双引号将所有文本作为单个参数传递
./myapp "$(cat text_file)"
./myapp "`cat text_file`"
Run Code Online (Sandbox Code Playgroud)