what is the difference between cmp and diff commands
Answers were Sorted based on User's Feedback
Answer / supreetha
cmp--> shows the first difference in the files
diff--> shows all the differences in the files
| Is This Answer Correct ? | 17 Yes | 4 No |
Answer / srikanth
cmp - It will compare files byte by byte
Ex: cmp text text1
text text1 differ: byte 2, line 1
diff - It will compare files line by line
If there are any differences in the file. Then it will print
to stdout along with all lines
| Is This Answer Correct ? | 13 Yes | 0 No |
What is the syntax of while loop in shell scripting?
RAM one table colums a1,a2,a3,a4 respective values 2,4,7,8 KRISH one table colums a1,a2,a3,a4 respective values 3,4,6,9 IN RAM & KRISH a4 column if comparing values RAM A4 - KRISH A4 ( 8-9 =1 THEN print 5 or (RAM) a4 value 10 KRISH a4 values 2 then 10 -2 =8 print 5*8=40 or diff 5 print same
How shell works?
Print the 10th line without using tail and head command.
what is the difference between cmp and diff commands
1.Write a script, which converts a number from binary to hexadecimal format or vice versa.
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What does echo mean in scripting?
What is shift command in shell script?
Explain about echo command?
What is basename in shell script?
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?