Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)

My command is something like this:

cat "Some text here." > myfile.txt

Possible? Such that my contents of the myfile.txt would now be overwritten to:

Some text here.

This is not working for me but also doesn't throw errors.

Specifically interested in the cat-based solution (not vim/vi/emacs, etc.). 

1 Answer

0 votes
by (36.8k points)

This what echo does:

echo "Some text here." > myfile.txt

Want to be a Linux expert? Come and join this Linux course

 

Related questions

0 votes
1 answer
0 votes
1 answer
asked Nov 22, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...