04-27-2007
Hi,
Thanx for the suggestions. I understand that the job can be done by different variations of scripts, but what I am eager about is "a single command/command pipe" which can do the job. If there are only specific number of entries in each line, i can manually compare them in command-line using awk/perl. But since I dont know the no. of entries in each line, the task is cumbersome.
I would be enlightened if I get a command pipe version of these scripts.
Thanks
Srini
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i tried resize command , but it's not working...... (4 Replies)
Discussion started by: gaurav123
4 Replies
2. UNIX for Dummies Questions & Answers
within a unix window, how do you setup your session to extend a word, by hitting the "esc" key twice.
e.g.
ls -la scri (esc key, esc key)
thankyou (6 Replies)
Discussion started by: venhart
6 Replies
3. Shell Programming and Scripting
Hi,
Please help!
I have a file having duplicate words in some line and I want to remove the duplicate words.
The order of the words in the output file doesn't matter.
INPUT_FILE
pink_kite red_pen ball pink_kite ball
yellow_flower white no white no
cloud nine_pen pink cloud pink nine_pen... (6 Replies)
Discussion started by: sam_2921
6 Replies
4. Shell Programming and Scripting
Hello,
i would like to alias aptitude install for sudo aptitude install, is it possible, and how ?
i read the man alias page, but i think i have to use something with \ or { but i don't know exactly what. (3 Replies)
Discussion started by: harlock59
3 Replies
5. Shell Programming and Scripting
I'm writing a script (C shell) to search for a pattern in file. For example
scriptname pattern file1 file2 filenN
I use for loop to loop through arguments argv, and it does the job if all arguments are supplied. However if only one argument is supplied (in that case pattern ) it should ask to... (5 Replies)
Discussion started by: patryk44
5 Replies
6. Shell Programming and Scripting
Hi,
How to identify duplicate columns in a row?
Input data: may have 30 columns
9211480750 LK 120070417 920091030
9211480893 AZ 120070607
9205323621 O7 120090914 120090914 1420090914 2020090914 2020090914
9211479568 AZ 120070327 320090730
9211479571 MM 120070326
9211480892 MM 120070324... (3 Replies)
Discussion started by: suresh3566
3 Replies
7. UNIX for Dummies Questions & Answers
Hi friends,
I have a xlsheet like below first column having id ABCfollowed by 7digit numbers and the next column have title against the ids. Titles are unique and duplicateboth, but ids are unique even for duplicate title.Now I need to identify those duplicate title having the highest id for... (9 Replies)
Discussion started by: umapearl
9 Replies
8. Shell Programming and Scripting
Hi everybody,
i have this biological situation to fix:
> Id.1
ACGTACANNNNNNNNNNNACGTGCNNNNNNNACTGTGGT
>Id.2
ACGGGT
>Id.3
ACGTNNNNNNNNNNNNACTGGGGG
>Id.4
ACGTGCGNNNNNNNNGGTCANNNNNNNNCGTGCAAANNNNN
........
....
These are nucleotidic sequences with some "NNNN..." always of the same... (4 Replies)
Discussion started by: Giorgio C
4 Replies
9. Shell Programming and Scripting
I am trying to build a sinkhole for BIND. I created a master zone file for malicious domains and created a separate conf file, but I am stuck.
I have a list of known bd domains that is updated nightly. The file simply contains the list of domains, one on each line:
Bad.com
Bad2.com... (4 Replies)
Discussion started by: uuallan
4 Replies
10. Shell Programming and Scripting
Hello,
I have a dictionary which I am building for the Open Source Community. The data structure is as under
HEADWORD=PARTOFSPEECH=ENGLISH MEANING
as shown in the example below
अ=m=Prefix signifying negation.
अँहँ=ind=Interjection expressing disapprobation.
अं=int=An interjection... (2 Replies)
Discussion started by: gimley
2 Replies
diff3(1) General Commands Manual diff3(1)
NAME
diff3 - Compares three files
SYNOPSIS
diff3 [-e | -x | -E | -X | -3] file1 file2 file3
The diff3 command reads three versions of a file and writes to standard output the ranges of text that differ.
OPTIONS
Creates an edit script for use with the ed command to incorporate into file1 all changes between file2 and file3 (that is, the changes that
normally would be flagged ==== and ====3). Produces an edit script to incorporate only changes flagged ====. These are similar to -e and
-x, respectively, but treat overlapping changes (that is, changes that are flagged ==== in the normal listing) differently. The overlap-
ping lines from both files are inserted by the edit script, bracketed by <<<<<< and >>>>>> lines. The -E option is used by RCS merge to
ensure that overlapping changes in the merged files are preserved and brought to someone's attention. Produces an edit script to incorpo-
rate only changes flagged ====3.
DESCRIPTION
The diff3 command reads three versions of a file and writes to standard output the ranges of text that differ, flagged with the following
codes: All three files differ. file1 differs. file2 differs. file3 differs.
The type of change needed to convert a given range of a given file to match another file is indicated in one of these two ways in the out-
put: Text is to be added after line number number1 in file, where file is 1, 2, or 3. Text in the range line number1 to line number2 is to
be changed. If number1 = number2, the range may be abbreviated to number1.
The original contents of the range follow immediately after a c indication. When the contents of two files are identical, diff3 does not
show the contents of the lower-numbered file, although it shows the location of the identical lines for each.
NOTES
Editing scripts produced by the -e option cannot create lines consisting only of a single . (dot).
EXAMPLES
To list the differences among three files, enter: diff3 fruit.a fruit.b fruit.c
fruit.a, fruit.b, and fruit.c contain the following data:
fruit.a:
banana grape kiwi lemon mango orange peach pare
fruit.b:
apple banana grapefruit kiwi orange peach pear
fruit.c:
grape grapefruit kiwi lemon mango orange peach pear
The output from diff3 shows the differences between these files as follows. (The comments on the right do not appear in the output.)
==== All three files are different. 1:1,2c - Lines 1 and 2 of the first file, fruit.a
banana
grape 2:1,3c - Lines 1 through 3 of fruit.b
apple
banana
grapefruit 3:1,2c - Lines 1 and 2 of fruit.c
grape
grapefruit ====2 The second file, fruit.b, is different. 1:4,5c - Lines 4 and 5 are the same in fruit.a and fruit.c. 2:4a
3:4,5c - To make fruit.b look the same, add text after line 4.
lemon
mango ====1 The first file, fruit.a, is different. 1:8c
pare 2:7c - Line 7 of fruit.b and line 8 of fruit.c are the same. 3:8c
pear
FILES
Helper program.
SEE ALSO
Commands: bdiff(1), cmp(1), comm(1), diff(1), ed(1)
diff3(1)