General :: Keep Duplicates Based On First Word Only
Mar 11, 2011I have a large file and want to keep lines which are duplicates, but the test for duplicates is performed only on the first blank-delimited word.
View 6 RepliesI have a large file and want to keep lines which are duplicates, but the test for duplicates is performed only on the first blank-delimited word.
View 6 RepliesI'm trying to use awk to remove rows that are duplicates based on 3 fields, and I want to keep the on that has the higher value in another field. I'm working in C-Shell. For example the below is greped out of a larger data set to use in here as example:
Input (Field separator is a comma:
Code:
4180,-6999,MA,BARNSTABLE,BOURNE,1,1.7,1700,PM,1/26
4180,-6999,MA,BARNSTABLE,BOURNE,1,3.5,2025,PM,1/26
4180,-6999,MA,BARNSTABLE,BOURNE,1,1.0,1511,PM,1/26
4180,-6999,MA,BARNSTABLE,BOURNE,1,5.7,0540,AM,1/27
[Cpde]....
I am looking for an cli based application what will open microsoft office documents in a cli based window. Very similar to the old Word for DOS application. Not I will be running this on the mini install, so no gui or packages are avalible.
View 5 Replies View RelatedWant to search for ~ and delete it as well as to append the entire line to the above line. For Ex:
1111xxxx date Sandy area is ~around this area.3222xxx date There seems to ~left side of map, the colours are accurate (showing green areas)Even if I ~zoom in, the green parks, xxx3258 date The dammed up
~away, the "other" body of water varies ~blackNatural gas leaching.
IT MUST LOOK LIKE:
1111xxxx date Sandy area is around this area. 3222xxx date There seems to left side of map, the colours are accurate (showing green areas)Even if I zoom in, the green parks, xxx3258 date The dammed up away, the "other" body of water varies blackNatural gas leaching.
I have to modify formsweb.cfg file in Oracle IAS.
Problem description
In formsweb.cfg file are two lines with labels archive_jini= and archive= at the beginning of line. After equal sign (=) is row of filenames of java archives delimited by coma(,). When I insert a new jar file in java directory, I have to append the very same name of jar file to both lines if that name is not yet present.
Example snippet from formsweb.cfg
I have a text file which is a list of all my contacts. So far i have only found software and commands which remove duplicates but i would like to remove all duplicates AND their original entries too so only contacts which have no duplicates are left.
View 10 Replies View RelatedWell, I am facing one issue:How can i read two files word by word at a time using any loop as i need word by word comparision in shell script?Please let me know pseudo code.
View 14 Replies View RelatedI have a output file look like this:
{"test1" : "test2", "test3" : "test4"},
How can I read word by word in each line?This is not working code:
a=0
while read word
do a=$(($a+1));
[code]...
In linux is there a way to find the next word of a particular word of a file. grep displays entire line of the particular word. But i want only the exact next word of that particular word.is there any command for that.
View 13 Replies View RelatedI notice that on DistroWatch, the descriptions include "debian based", "arch based", etc. For the newbie, is there any practical difference between the different bases, or is it a Coke vs Pepsi type question?
Is a distro based on Debian say, easier for a newbie to learn or work with than say one that is FreeBSD based?
How can I find a list of files that are named duplicates i.e. have same name but in different case that exist in the same directory?
View 7 Replies View RelatedI am using 10.10 but am having a problem with duplicates being automatically downloaded into my inbox in evolution. This has not happened under 10.04 with the same settings. How torid my inbox of the dupes? It seems to have faded away after the "official release" but I still have a messed up inbox. I use gmail recent mode with pop settings.
View 14 Replies View RelatedI am pretty new to bash scripting...I am trying to write a script that will take an input and read it word for word and then DO something with it like echo. I have been able to find how to read word for word from a file but I don't know how to do it with input.
I was looking for something like
Code:
exit 0 The input would be A-Z a-z 0-9 and have a single space between each word.
When you use an IDE and it asks you if you want frame based or dialog based, what is the difference?
View 1 Replies View Relatedwhat distro should i use, rpm based or debian based?
View 2 Replies View RelatedI have a set of files in .doc format, that need to be converted to .pdf format. I am using Ubuntu linux.
View 7 Replies View RelatedI'm trying to add a word at the end of a file that already contains data. I need to do it using a single command without human interaction cause it's gonna be part of an automatic script.
View 2 Replies View RelatedI want to add word autocompletion feature to my vi editor.my .dict file contains C++ keyword(near about 90 words).
View 2 Replies View RelatedHow can I make the less utility in Linux not wrap lines?
Long version: Often I need to view huge CSV files using less with hundreds of columns. I frequently only care about the first couple columns. However, word wrap causes one line to become several lines even on wide-screen monitors.
I have a script to output the result ( eg. echo $x ) , then send result to my Lotus mail server , can advise if I want to bold the words in the mail , what can i do ? thx
View 2 Replies View Relatedwhat would be the syntax to delete a line containg the word "word" from the file "file" i want to delete the whole line and not only the word...
View 6 Replies View RelatedI want to use an utility to convert word,pdf to html with same formatting. that utility able to run in commandline also. i want to integrate it in web page. so which utility is suitable for it
View 9 Replies View RelatedI need a bash script that can read a file, say example.txt search for the string "This is my example string" and save whatever word/number comes immediately after it to a variable, var.
Example:
blah blah
blah This is my example string extracthere is a very nice word.
blah blah
There are two constraints:1. This needs to assume as little as possible about the nature of the known string "This is my example string" and the word that follows it. I am trying to keep my code adaptable.2. Speed is valuable. This shell will be executed dozens if not hundreds of times so speed is very desirable. I thought I read that some commands are faster than others.
I am trying to get a word from a line using sed. Following is the line which I want to use.
inet addr:10.245.86.15 Bcast:10.245.87.255 Mask:255.255.254.0 inet6 addr: fe80::1031:3dff:fe01:55e1/64 Scope:Link
From the above line, I need the ip address like 10.245.86.15 only.
I am having problem in adding a word in same place on different line in vi editor (/bin/bash).
View 4 Replies View RelatedI tried to use the command:
sed -i ''$line_number',/port/s/port/portMARKED/' file
to substitute the word "port" by the word "portMARKED" at the specific line that is saved in "line_number". The substitution happens, but it is copying my line twice... and I have no idea why... I need to make a single substitution of one word for another at a certain line in my text file. Would somebody know how I could do that?
Found a font bug: in the Arial-KOI type, the "è" word is replaced by a "X" word...
View 3 Replies View RelatedI've got some source code that loads and plays WAV files through the OSS drivers (and USB audio). The code works even under 2.6.34. Is there any benefit to rewriting the code using the ALSA system?
View 1 Replies View RelatedI have a CentOS 5.6 box and was wondering if there are any tools for Linux that can convert a Microsoft Word document to a TIFF file?
View 2 Replies View RelatedIs there a (Linux) command-line tool to extract all the images from a MS Word document, (preferably one that could handle the .docx format)?
View 1 Replies View Related