Hello, I am new to scripting and need some help. In looking at other posts on this forum, I came up with the following logic. I cannot figure out why I am getting names of files of the current directory in my echo output.
Scenario: message file has a line containing the version. Version.txt... (2 Replies)
Dear All,
Is it possible to compare 2 files line to line using column values?
for example I have file1:
1;givi;01012000;wer
2;sss;02012000;rrr
3;ccc;03012000;ttt
file 2:
0;uuu;01012000;lll
1;givi;01012000;wer
2;sss;02012000;rrr
3;ccc;03012000;ttt
5;givi;01012000;hhh
I want... (4 Replies)
Hi,
Could someone please help me with the best approach to compare lines from one file to another? Here is how I have entries -
File 1
a1
a2
a3
a4
a9
a10
a15
File2
a5
a6
a15 (5 Replies)
Hi everyone
I have a dilemma and I'm hoping someone has an answer for me.
I have two files:
# cat masterfile
line3
line4
line5
line6
line7
# cat tempfile
line1
line2
line3
line4
I want to compare tempfile with masterfile. (3 Replies)
Hi Guys,
I want to find any differences between packages installed on 2 servers/zones.
I have 2 files that contain the output from pkginfo -x . I want to know if any packages exist only in one file and I want to also know about any packages that exist in both but with a different version.
ie:... (8 Replies)
Inspired by the extremely short awk code from Ygor on this post I wanted to compare two files on only one field. I can't get it to work. Can anybody help on explaining the code and fix the code?
My code which does not work:
awk 'BEGIN{a=1};a!=1' file1.txt file2.txt >outfile.txt
file1.txt... (1 Reply)
Hi all,
I've been trying to write a script to compare two files. This is what I want:
file 1:
a 1 2
b 5 9
c 4 7
file 2:
a
a
c
a
b
Output:
a 1 2
a 1 2 (2 Replies)
I have two files
I need to compare these two files and take the lines that are common in both the files and consider the line present in second file for my further processing
I have used "Awk" along with "FNR and NR" but that is not working
gawk -F= '
> FNR==NR {a=$1; next};
> ... (2 Replies)
I am having a two files and different days, and this is example:
file1: 06.09.2017.
abcd
123
file2: 07.09.2017.
abcd
1234
So what I want is that file2 with today's date contains only 1234, so where is a problem you would ask?
Problem is here that I put these commands into routers,. and... (3 Replies)
Discussion started by: tomislav91
3 Replies
LEARN ABOUT SUSE
lzdiff
XZDIFF(1) XZ Utils XZDIFF(1)NAME
xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files
SYNOPSIS
xzcmp [cmp_options] file1 [file2]
xzdiff [diff_options] file1 [file2]
lzcmp [cmp_options] file1 [file2]
lzdiff [diff_options] file1 [file2]
DESCRIPTION
xzcmp and xdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed
directly to cmp or diff. If only one file is specified, then the files compared are file1 (which must have a suffix of a supported com-
pression format) and file1 from which the compression format suffix has been stripped. If two files are specified, then they are uncom-
pressed if necessary and fed to cmp(1) or diff(1). The exit status from cmp or diff is preserved.
The names lzcmp and lzdiff are provided for backward compatibility with LZMA Utils.
SEE ALSO cmp(1), diff(1), xz(1), gzip(1), bzip2(1), zdiff(1)BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified.
Tukaani 2009-07-05 XZDIFF(1)