what these two commands prints "echo test","cat test"?
Answers were Sorted based on User's Feedback
Answer / sivaji
"echo test", echo simply prints test.
"cat test" cat command will searches for a file as "test"
in the PWD. if it finds any file called "test", then it
will prints the contents of the test file. else will
through the error as file not exisiting
| Is This Answer Correct ? | 68 Yes | 4 No |
Answer / gayathri
echo test just prints test while cat test gives the
contents of the file called test.
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / durgesh srivastava
1. echo test is print test world as same it is in his
output.
2.cat test is show the contant of file test.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / asrar ahmed
(1) echo test:
echo test will print the output as "test"
$echo test
test
(2)cat test:
cat test will print the content of the file, if the file is
present.
$ cat test
Jan
Feb
Mar
Now we can remove the file test:
$ rm test
$ cat test
cat: test: No such file or directory
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / anil
echo "Test" ---echo function will print the given value
with in the quotes.
cat test ---- cats command first check the PWD given value
is there are not.if there it gives the content of values.if
not it will thorough the error.
| Is This Answer Correct ? | 3 Yes | 0 No |
In Unix file permissions what does the second field denotes?
If we want to see first 35 lines of a file which command we have to use?
How do I use grep to search for a file?
What command will change your prompt to myprompt?
How to view the hidden files in /etc directory?
Hi All, Can you please let me know how to grep for a particular pattern in unix. I want to print the dates from the file exp.txt. the date pattern is DD:MM:YYYY, I just want to print all the dates from the file exp.txt.
8 Answers Concentrix, IBM, Symantec, TCS,
Which unix command lists files/folders in alphabetical order?
How do I use grep to find a file?
What is the comma to show the space allocation of files?
What is nr in awk command?
Why is it called grep?
the difference between a soft link and a hard link?