Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.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
File shell脚本写入新文件_File_Text_Shell - Fatal编程技术网

File shell脚本写入新文件

File shell脚本写入新文件,file,text,shell,File,Text,Shell,快速问题:如果我执行以下操作,它将创建文件,还是必须单独创建 echo "output" > file.txt 除非您无权在当前目录中创建文件,否则它将创建该文件。在命令中,它将创建文件。你为什么不试试?

快速问题:如果我执行以下操作,它将创建文件,还是必须单独创建

 echo "output" > file.txt

除非您无权在当前目录中创建文件,否则它将创建该文件。

在命令中,它将创建文件。你为什么不试试?