can we use cat command as an editor ..???

Answer Posted / kesava swamy pindi

Yes, we can use 'cat' command as an editor.

Ex: cat > names.txt
hai
hello
ctrl+c
Here, iam creating a file called 'names.txt'. If this file
already exists, the old contents of the file will be
overwritten; else new empty file is created and data is
placed in this file.

Also, we can append new content to existing file using cat
command.

Ex: cat >> names.txt
bye
crtl+c

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does grep v do?

765


What is awk command used for?

783


What is grep and how do you use it?

783


How do you repeat a command in terminal?

837


What do chown command do?

789


What is the search command in unix?

818


What is the comma to show the space allocation of files?

762


Which command is used to kill the last background job?

1010


What are the general commands in using unix os for a beginner?

808


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

811


Explain how to use grep command to list find the records of a file containing 10 different strings?

802


Which command is used to restrict incoming messages?

784


How can you see the command line history?

824


How do you grep a case insensitive?

734


What is the difference between cat command and more command?

799