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

后端 未结 12 1135
南方客
南方客 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 20:01

    simply pipeline echo with cat

    For example

    echo write something to file.txt | cat > file.txt
    

提交回复
热议问题