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

Why is shebang used?

598


Why is it called a shebang?

574


What happens when we execute a unix command?

600


Can you enlist some commonly used network commands?

602


What is the first character of the output in ls l command?

637






Which command is used to kill the last background job?

783


Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?

645


Explain command to display different lines that are found when compare two files?

678


What do chgrp command do?

592


What is command statement?

543


What do know about tee command?

607


What are the differences among a system call, a library function, and a unix command?

568


Is ‘du’ a command? If so, what is its use?

639


How do I run a whois command?

605


What are filter commands in unix?

555