Sponsored Content
Top Forums Shell Programming and Scripting Merging Frequencies in a File Post 302507167 by gimley on Wednesday 23rd of March 2011 01:01:44 AM
Old 03-23-2011
Hello,
Many thanks. But the script did not give correct result.
Here is a sample of the input:
aabha 21
aabha 69
aabha 90
aabid 115
aabid 14
aabid 215
aabid 86
aabida 121
aabida 42
aabida 79
aadesa 197
aadesh 52
aadil 31
aaditykumar 69
aaekar 253
aaekaranata 86
aaekaranath 66
aaemakar 315
aaemapal 204
aaemaprakas 145
aaemaprakasa 2500
aaemaprakash 1494
aaemavati 754
aaenkar 177
aaereelal 333
aaeri 358
aafat 66
aafatab 192
aaftab 35
aagani 229
aagani 278
aagani 49

The output was:

aabha 21
aabha 69
aabha 90
aabid 115
aabid 14
aabid 215
aabid 86
aabida 121
aabida 42
aabida 79
aadesa 197
aadesh 52
aadil 31
aaditykumar 69
aaekar 253
aaekaranata 86
aaekaranath 66
aaemakar 315
aaemapal 204
aaemaprakas 145
aaemaprakasa 2500
aaemaprakash 1494
aaemavati 754
aaenkar 177
aaereelal 333
aaeri 358
aafat 66
aafatab 192
aaftab 35
aagani 229
aagani 278
aagani 49
As you can see, the frequencies did not merge.
The program is blazingly fast but the merging does not take place.
Many thanks,
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Merging Two File Horizontally

I am trying to merge two large file horizontally using paste command. Every thing is working fine except for time. Its taking lot of time. Is there any effiecient way of doing the same thing or is there anyway by which I can improve its perfomance programatically? Thanks, Yeheya (1 Reply)
Discussion started by: yeheyaansari
1 Replies

2. UNIX for Dummies Questions & Answers

merging two lines in a file

Hi All, I want to merge two lines in a file till the end of the file. So what could be the command to get so. say file name : sample.txt contents: country=1 send apps =1 rece=2 country=2 send apps =3 rece=3 .. ... output: country=1;send apps =1 rece=2 country=2;send apps =3... (6 Replies)
Discussion started by: thaduka
6 Replies

3. UNIX for Dummies Questions & Answers

merging 2 file

I have 2 files file1.txt a 123 aqsw c 234 sfdr fil2.txt b 345 hgy d 4653 jgut I want to merger in such a manner the the output file should be outfile.txt a 123 aqsw b 345 hgy c 234 sfdr d 4653 jgut Do we have any command to achive this? (8 Replies)
Discussion started by: siba.s.nayak
8 Replies

4. Shell Programming and Scripting

Extracting a column from a file and merging with other file using awk

Hi All: I have following files: File 1: <header> text... text .. text .. text .. <\header> x y z ... File 2: <header> text... text .. text .. (4 Replies)
Discussion started by: mrn006
4 Replies

5. Shell Programming and Scripting

Recalculating frequencies

My file looks like this The first 2 sequences are identical (different ID and frequencies though). The same thing for the last 2. What I need is to compare all sequences within the file and if they are identical, they need to be 'compressed' to one entry and the frequency should be recalculated.... (8 Replies)
Discussion started by: Xterra
8 Replies

6. Shell Programming and Scripting

Appending lines with word frequencies, ordering and indexing a column

Dear All, I have the following input data: w1 20 g1 w1 10 g1 w2 12 g1 w2 23 g1 w3 10 g1 w3 17 g1 w3 12.5 g1 w3 21 g1 w4 11 g1 w4 13.2 g1 w4 23 g1 w4 18 g1 First I seek to find the word frequencies in col1 and sort col2 in ascending order for each change in a col1 word. Second,... (5 Replies)
Discussion started by: Ghetz
5 Replies

7. Shell Programming and Scripting

Merging data from one file into another

Hello, I have a master database of a dictionary with the following structure: a=b (b is a Unicode string) a is the English part and b is the equivalent in a foreign language I have also another file which has a database where the /b/ part of the string has been corrected by an expert. let us... (5 Replies)
Discussion started by: gimley
5 Replies

8. Shell Programming and Scripting

merging two file

Dear All, I have two file like this: file1: a1234 b1235 c4678 d7859 file2 : e4575 f7869 g7689 h9687 I want output like this: a1234 b1235 c4678 (2 Replies)
Discussion started by: attila
2 Replies

9. Shell Programming and Scripting

Removal of extra spaces in *.log files to allow extraction of frequencies

Our university has upgraded its version of a computational chemistry program that our group uses quite regularly. In the past we have been able to extract frequency spectra from log files that are generated. Since the upgrade, the viewing program errors out. I've been able to trace down the changes... (16 Replies)
Discussion started by: wsuchem
16 Replies

10. UNIX for Dummies Questions & Answers

Gaps and frequencies

I have this infile: >GHL8OVD01BNNCA Freq 10 TAGATGTGCCCGTGGGTTTCCCGTCAACACCGGATAGT-GCAGCA-TA >GHL8OVD01CMQVT Freq 1 TTGATGTCGTGGGTTTCCCGTCAACACCGGCAAATAGT-GCAGCA-TA >GHL8OVD01CMQVT Freq 1 TTGATGTGCCAGTTTCCCGTCTAGCAGCACTACCAGGACCTTCGC-TA >GHL8OVD01CMQVW Freq 1... (1 Reply)
Discussion started by: Xterra
1 Replies
pipes(6x)							XScreenSaver manual							 pipes(6x)

NAME
pipes - fill the screen with a plumbing system. SYNOPSIS
pipes [-display host:display.screen] [-visual visual] [-window] [-root] [-count 0] [-count 1] [-cycles number] [-size number] [-factory number] [-delay number] [-no-fisheye] [-tightturns] [-db] [-fps] DESCRIPTION
If you've ever been in the same room as a Windows NT machine, you've probably seen this GL hack. It fills the screen with a plumbing sys- tem. OPTIONS
-visual visual Specify which visual to use. Legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual. -window Draw on a newly-created window. This is the default. -root Draw on the root window. -count 0 Curved Pipes. -count 1 Ball Joints. -cycles number Number of pipe systems to draw at once. Default: 5. -size number Length of each pipe system. Default: 500. -factory number How much gadgetry to create; Useful range is 0-10. Default: 2. -delay number How long (in microseconds) to sleep between frames. Default: 10000. -fisheye | -no-fisheye Whether to use a fisheye lens. -tightturns | -no-tightturns Whether to allow tight turns. -db | -no-db Whether to double-buffer. -fps Display the current frame rate, CPU load, and polygon count. ENVIRONMENT
DISPLAY to get the default host and display number. XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property. SEE ALSO
X(1), xscreensaver(1) COPYRIGHT
Copyright (C) 2002 by Marcelo Vianna. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHOR
Marcelo Vianna. X Version 11 5.15 (28-Sep-2011) pipes(6x)
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy