Can linux cat command be used for writing text to file?

后端 未结 12 1238
南方客
南方客 2021-01-29 19:03

Is something like this:

cat \"Some text here.\" > myfile.txt

Possible? Such that the contents of myfile.txt would now be overwr

12条回答
  •  轮回少年
    2021-01-29 19:42

    cat > filename.txt
    

    enter the text until EOF for save the text use : ctrl+d

    if you want to read that .txt file use

    cat filename.txt
    

    and one thing .txt is not mandatory, its for your reference.

提交回复
热议问题