Ok here's what I'm trying to do. I need to get a listing of all the mountpoints on a system into a file, which is easy enough, just using something like "mount | awk '{print $1}'"
However, on a couple of systems, they have some mount points looking like this:
/stage
/stand
/usr
/MFPIS... (2 Replies)
OK, I have read several things on how to do this, but can't make it work. I am writing this to a vi file then calling it as an awk script.
So I need to search a file for duplicate lines, delete duplicate lines, then write the result to another file, say /home/accountant/files/docs/nodup
... (2 Replies)
Hi please help me how to remove duplicate lines in any file.
I have a file having huge number of lines.
i want to remove selected lines in it.
And also if there exists duplicate lines, I want to delete the rest & just keep one of them.
Please help me with any unix commands or even fortran... (7 Replies)
Hey all, a relative bash/script newbie trying solve a problem.
I've got a text file with lots of lines that I've been able to clean up and format with awk/sed/cut, but now I'd like to remove the lines with duplicate usernames based on time stamp. Here's what the data looks like
2007-11-03... (3 Replies)
hi :)
I need to delete partial duplicate lines
I have this in a file
sihp8027,/opt/cf20,1980182
sihp8027,/opt/oracle/10gRelIIcd,155200016
sihp8027,/opt/oracle/10gRelIIcd,155200176
sihp8027,/var/opt/ERP,10376312
and need to leave it like this:
sihp8027,/opt/cf20,1980182... (2 Replies)
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
The question is not as simple as the title... I have a file, it looks like this
<string name="string1">RZ-LED</string>
<string name="string2">2.0</string>
<string name="string2">Version 2.0</string>
<string name="string3">BP</string>
I would like to check for duplicate entries of... (11 Replies)
Dear folks
I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
Hi
I need to delete duplicate like pattern lines from a text file containing 2 duplicates only (one being subset of the other) using sed or awk preferably.
Input:
FM:Chicago:Development
FM:Chicago:Development:Score
SR:Cary:Testing:Testcases
PM:Newyork:Scripting
PM:Newyork:Scripting:Audit... (6 Replies)
Discussion started by: tech_frk
6 Replies
LEARN ABOUT REDHAT
diffstat
DIFFSTAT(1) General Commands Manual DIFFSTAT(1)NAME
diffstat - make histogram from diff-output
USAGE
diffstat [options] [file-specifications]
SYNOPSIS
This program reads the output of diff and displays a histogram of the insertions, deletions, and modifications per-file.
DESCRIPTION
Diffstat is a program that is useful for reviewing large, complex patch files. It reads from one or more input files which contain output
from diff, producing a histogram of the total lines changed for each file referenced. If the input filename ends with .bz2, .Z or .gz,
diffstat will read the uncompressed data via a pipe.
Diffstat recognizes the most popular types of output from diff:
unified
preferred by the patch utility.
context
best for readability, but not very compact.
default
not good for much, but simple to generate.
Diffstat detects the lines that are output by diff to tell which files are compared, and then counts the markers in the first column that
denote the type of change (insertion, deletion or modification). These are shown in the histogram as "+", "-" and "!" characters.
If no filename is given on the command line, diffstat reads the differences from the standard input.
OPTIONS -c prefix each line of output with "#", making it a comment-line for shell scripts.
-f format
specify 0 for concise, 1 for normal output.
-k suppress the merging of filenames in the report.
-n number
specify the minimum width used for filenames. If you don't specify this, diffstat uses the length of the longest filename, after
stripping common prefixes.
-p number
override the logic that strips common pathnames, simulating the patch "-p" option.
-u suppress the sorting of filenames in the report.
-V prints the current version number
-w number
specify the maximum width of the histogram. The plot will never be shorter than 10 columns, just in case the filenames get too
large.
ENVIRONMENT
Diffstat runs in a portable UNIX(R) environment.
FILES
Diffstat is a single binary module, which uses no auxiliary files.
BUGS
Diffstat makes a lot of assumptions about the format of a diff file.
There's no easy way to determine the degree of overlap between the "before" and "after" displays of modified lines.
SEE ALSO
diff (1).
AUTHOR
Thomas Dickey <dickey@invisible-island.net>.
DIFFSTAT(1)