10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am using the below command to get the diff output of two files.
Here in the output file, I wish to add line number in front of each line starting position.
Please suggest the diff options or some command line utilities.
diff -y file1.txt file2.txt --width=300 > diff_f1_f2_300.txt... (5 Replies)
Discussion started by: k_manimuthu
5 Replies
2. UNIX for Dummies Questions & Answers
Platform :Oracle Linux 6.4
Shell : bash
In the below sample, although the lines in a.txt and b.txt are jumbled up, there is only one difference : b.txt has an extra line NETHERLANDS
$ cat a.txt
SPAIN
NORTH KOREA
PORTUGAL
GERMANY
SYRIA
$
$
$ cat b.txt
GERMANY
NORTH KOREA
SPAIN... (6 Replies)
Discussion started by: John K
6 Replies
3. Shell Programming and Scripting
I have a csv file that I am trying to edit. I need to remove any comma that is touching a letter. I used this command to find them.
grep , moz_places_good.csv | head -n 10 | grep ,I would think I could use some form of this to just delete the commas and not the letter before it. Just not sure... (5 Replies)
Discussion started by: cokedude
5 Replies
4. Shell Programming and Scripting
Hello Guys,
I request anyone to do me a small help in using diff command for following.
I am trying to compare two files for content and wish to keep the content after the comparison (The resultant file can't be blank)
However, the first lines would be different in both files and I need diff... (2 Replies)
Discussion started by: rockf1bull
2 Replies
5. Shell Programming and Scripting
hi there
Strange title? Well yes...it is strange..."touch" is driving me nutts! Trying to set the access / modified date by a bash script. For a certain time everything works well with all files. After point x the code works only for some files, for others it doesn't. After looking for the ... (4 Replies)
Discussion started by: blah0
4 Replies
6. UNIX for Dummies Questions & Answers
So, I think this is a really stupid question, but I'd like to see if I am right.
If the following commands are entered:
umask 000
touch file1
umask111
touch file2
...nothing should happen...right? The touch operation isn't going to apply any changes from umask to file1 (and same to... (1 Reply)
Discussion started by: Midwest Product
1 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have a small problem and would be happy if someone could help me to find a solution:
A machine ("server") makes backups of different computers ("clients") using rsync. Users and groups are keept, so that it's possible to copy them back to the client if required. The number of groups... (3 Replies)
Discussion started by: tracer
3 Replies
8. Shell Programming and Scripting
i have 2 file named test1,test2
contents of test1:
1
2
3
---------------------------
contents of test2:
1
2
3
4
5
--------------------------------------------------------
my desired o/p should be:
diff test2 test1
4 (5 Replies)
Discussion started by: ali560045
5 Replies
9. Programming
i need to create a file which contains (/) character.
Any help to do this (1 Reply)
Discussion started by: axes
1 Replies
10. Shell Programming and Scripting
Hi,
Is there any way to achieve diff of two files line by line.
for eg,
a.txt
a
b
c
d
e
b.txt
f
g
h
i
j (1 Reply)
Discussion started by: Omkumar
1 Replies
ZDIFF(1) General Commands Manual ZDIFF(1)
NAME
zcmp, zdiff - compare compressed files
SYNOPSIS
zcmp [ cmp_options ] file1 [ file2 ]
zdiff [ diff_options ] file1 [ file2 ]
DESCRIPTION
Zcmp and zdiff are used to invoke the cmp or the diff program on files compressed via gzip. All options specified are passed directly to
cmp or diff. If only file1 is specified, it is compared to the uncompressed contents of file1.gz. If two files are specified, their con-
tents (uncompressed if necessary) are fed to cmp or diff. The input files are not modified. The exit status from cmp or diff is pre-
served.
SEE ALSO
cmp(1), diff(1), zmore(1), zgrep(1), znew(1), zforce(1), gzip(1), gzexe(1)
BUGS
Messages from the cmp or diff programs may refer to file names such as "-" instead of to the file names specified.
ZDIFF(1)