How about, hoping that any invisible surprises like the ones corona688 mentioned will have been taken care of, and untested, from a windows machine, so bear with me:
BTW, if ($3 = $4) should read if ($3 == $4), but this would not explain the additional line feed that you complain about.
Thanks Rudi, but that didn't produce the desired output RESULT2. BTW, is there a quick way to clean up a file that may have hidden spaces and other sorts of things to make it a clean tab delimited file.
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
I am using the following command:
nawk -F"," 'NR==FNR {a=$1;next} a {print a,$1,$2,$3}' file1 file2
I am getting 40 records output.
But when i import file1 and file2 in MS Access i get 140 records.
And i know 140 is correct count.
Appreciate your help on correcting the above script (5 Replies)
I have a number of unix text files containing fixed-length records (normal unix linefeed terminator) where I need to find odd records which are an incorrect length.
The data is not validated and records can contain odd backslash characters and control characters which makes them awkward to process... (2 Replies)
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Hello friends,
I searched in forums for similar threads but what I want is to have a single awk code to perform followings;
I have a big log file going like this;
...
7450494 1724465 -47 003A98B710C0
7450492 1724461 -69 003A98B710C0
7450488 1724459 001DA1915B70 trafo_14:3
7450482... (5 Replies)
I want to extract a web page to a temporary file as a source document. I tried: wget $webPgURL > /tmp/tmpfil
but it says I have a missing URL. I have echoed $webPgURL just prior to the wget command and it is correct. If I use: firefox $webPbURL it brings up firefox with the correct page. Can... (3 Replies)
cat T|awk -v format=$format '{ SUM += $1} END { printf format,SUM}'
the file T has below data
usghrt45tf:hrguat:/home/hrguat $ cat T
-1363000.00123456789
-95000.00789456123
-986000.0045612378
-594000.0015978
-368939.54159753258415
-310259.0578945612
-133197.37123456789... (4 Replies)
Running solaris 9, on issuing the follwing command
df -h | awk '$5 > 45 {print}'
Filesystems with utilisation > 45% are being displayed as well as those between
5 and-9%!!! (3 Replies)
Hi All,
I am looking to filter out filesystems which are greter than a specific value.
I use the command
df -h | awk '$4 >=70.00 {print $4,$5}'
But this results out as below, which also gives for lower values.
9% /u01
86% /home
8% /u01/data
82% /install
70% /u01/app
Looks... (3 Replies)
Discussion started by: jjoy
3 Replies
LEARN ABOUT CENTOS
lzcmp
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 xzdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1), bzip2(1), or lzop(1). All options specified
are passed directly to cmp(1) or diff(1). If only one file is specified, then the files compared are file1 (which must have a suffix of a
supported compression format) and file1 from which the compression format suffix has been stripped. If two files are specified, then they
are uncompressed if necessary and fed to cmp(1) or diff(1). The exit status from cmp(1) or diff(1) 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), lzop(1), zdiff(1)BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified.
Tukaani 2011-03-19 XZDIFF(1)