Sponsored Content
Top Forums Shell Programming and Scripting to get two almost identical rows into one Post 302344735 by ricky315 on Monday 17th of August 2009 12:09:41 PM
Old 08-17-2009
Question to get two almost identical rows into one

Hi All,
I am having hard time in getting two almost identical rows into one, I know how to do if starting word is unique, anyhow this is my problem

Input File:
issue1 5167
dum 1 1 kkk 7888
dum 2 1 ffff 7888
dum 2 2 llll 7888
dum 3 1 eee 7888
issue2 7667
dum 2 1 jjjj 8999
dum 2 2 jjjj 8999
dum 3 pppp 8999

Output should be:
issue1 5167 1 kkk 2 ffff 2 llll 3 eee
issue2 7667 2 jjjj 3 pppp


Can someone give me a idea, of how to proceed with this, would be grately helpful if anyone can put all those ideas into writing...

Thanks,
Ricky
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to check the files are Identical or not?

Hi, I am taking backup in every hr and every day, I want to programmatically check my backup files are identical with original files. Any methods are available in Unix scripts? Any idea.? I don't want to download both and compare, I looking for idea to develop a script to read both files and... (3 Replies)
Discussion started by: redlotus72
3 Replies

2. Shell Programming and Scripting

list only identical filename

Hi Friends, We have four filenames with first few digits are identical.From those files, i need to pick up 2 files based on my parameter. The following example will give more information to understand my question. Files in the directory: small_customer_aa.csv small_customer_ab.csv... (6 Replies)
Discussion started by: HAA
6 Replies

3. Shell Programming and Scripting

replace 2 identical strings on different lines

I am looking to replace two or more strings on different lines using sed, but not with the same variable. IE # cat xxx.file <abc> abc def ghi abc def ghi abc def ghi currently I can only change each line with the same pattern: # sed -e '/<abc>/!s/abc\(.*\)/jkl mno/' xxx.file abc jkl mno... (3 Replies)
Discussion started by: prkfriryce
3 Replies

4. UNIX for Dummies Questions & Answers

du -s -k differences between two identical directories

I tarred a directory from a linux server to a solaris server. When I do a du -s -k on the directory, I get almost 150k difference in the file sizes. If I do a ls | wc -l, it is the same. If I look at the size of the individual files, it is the same. I did an ls on the 2 directories and... (6 Replies)
Discussion started by: csgonan
6 Replies

5. Shell Programming and Scripting

Ignore identical lines

Hello Experts, I have two files called "old" and "new". My old file contains 10 lines and my new file contains 10 + "n" lines. The first field in both these files contain ID. I sort these two files on ID. I am interested in only the lines that are in the new file and not in old. I tried... (4 Replies)
Discussion started by: forumthreads
4 Replies

6. Shell Programming and Scripting

Removing identical words in column

I have a file that needs to be cleaned up. Here is the file: Project Project John Project Gary Project Sean Project2 Project2 Lisa Project2 Tyler Project2 Sam Project3 Project3 Mike Project3 Bran I need the o/p to be: Project John Gary Sean Project2 (7 Replies)
Discussion started by: leepet01
7 Replies

7. Solaris

Mirroring using non-identical disks

I've been testing mirroring root partitions for the past few days within a virtual environment and on an old ML350. However, the live system that this is practice for has two disks, and they're non-identical. I've done a bit of searching through the forum and see that a lot of people recommend... (2 Replies)
Discussion started by: lm69a
2 Replies

8. UNIX for Dummies Questions & Answers

more than 10 identical lines

I have a file that looks like this 10 user1s, 5 user2s and 10 users3. 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.2 user2 10.10.1.2 user2 10.10.1.2 user2... (7 Replies)
Discussion started by: lawsongeek
7 Replies

9. Ubuntu

reinstall identical system?

I have my Ubuntu system nicely tailored to my needs, with specific software installed, and other things removed. I'd like to build a new PC, and have the identical software configuration on it. Is there some easy way to export the list of installed software to a file? Then have the new machine... (3 Replies)
Discussion started by: lupin..the..3rd
3 Replies

10. Shell Programming and Scripting

Print text between 2 identical strings

hey, i m having a hard time trying to print only the first occurrence between 2 idenicale strings. for the following output: please help me im a noob please im a noob help me noob please help me im a noob please im a noob help me noob (3 Replies)
Discussion started by: boaz733
3 Replies
HTML::FormFu::Element::SimpleTable(3pm) 		User Contributed Perl Documentation		   HTML::FormFu::Element::SimpleTable(3pm)

NAME
HTML::FormFu::Element::SimpleTable - simple table element SYNOPSIS
The following is yaml markup for a table consisting of a header row containing 2 "th" cells, and a further 2 rows, each containing 2 "td" cells. type: SimpleTable headers: - One - Two rows: - - type: Input name: one_a - type: Input name: two_a - - type: Input name: one_b - type: Input name: two_b DESCRIPTION
Sometimes you just really need to use a table to display some fields in a grid format. As its name suggests, this is a compromise between power and simplicity. If you want more control of the markup, you'll probably just have to revert to using nested block's, setting the tags to table, tr, td, etc. and adding the cell contents as elements. METHODS
headers Input Value: @headers "headers" accepts an arrayref of strings. Each string is xml-escaped and inserted into a new header cell. rows Input Value: @rows "rows" accepts an array-ref, each item representing a new row. Each row should be comprised of an array-ref, each item representing a table cell. Each cell item should be appropriate for passing to "element" in HTML::FormFu; so either a single element's definition, or an array-ref of element definitions. odd_class Input Value: $string The supplied string will be used as the class-name for each odd-numbered row (not counting any header row). even_class Input Value: $string The supplied string will be used as the class-name for each even-numbered row (not counting any header row). SEE ALSO
Is a sub-class of, and inherits methods from HTML::FormFu::Element::Block, HTML::FormFu::Element HTML::FormFu AUTHOR
Carl Franks, "cfranks@cpan.org" LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-23 HTML::FormFu::Element::SimpleTable(3pm)
All times are GMT -4. The time now is 12:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy