Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 如何从启动时运行的脚本打开文件_C_Shell_U Boot - Fatal编程技术网

C 如何从启动时运行的脚本打开文件

C 如何从启动时运行的脚本打开文件,c,shell,u-boot,C,Shell,U Boot,我正在u-boot中运行脚本文件。我想创建一个文件并保存我的内容。我尝试了以下操作: cat > info.txt <<- "EOF" // opening the file echo "${mmcpart}" | tee info.txt // adding contents echo "${root_fs}" | tee -a info.txt EOF 它不起作用。。。。。。。。。。有谁能帮我找出u-boot不支持shell脚本语法,u-

我正在u-boot中运行脚本文件。我想创建一个文件并保存我的内容。我尝试了以下操作:

cat > info.txt <<- "EOF"        // opening the file
echo "${mmcpart}" | tee info.txt           // adding contents
echo "${root_fs}" | tee -a info.txt
EOF

它不起作用。。。。。。。。。。有谁能帮我找出u-boot不支持shell脚本语法,u-boot有,并且在读取文件和操作环境变量时,您可以遵循

为什么使用“c”标志?这里没有C。
echo "${root_fs}" | tee -a info.txt