Sponsored Content
Top Forums Shell Programming and Scripting Manipulate data in detail problem facing Post 302380015 by patrick87 on Monday 14th of December 2009 02:36:31 AM
Old 12-14-2009
Manipulate data in detail problem facing

Input
Code:
Participant number: HAC
Position type Location Distance_start Distance_end Range Mark
   1    1  +  Front          808       1083      276
   2    1  +  Front         1373       1636      264
   3    1  -  Back       1837       2047      211

Participant number: BCD
Position type Location Distance_start Distance_end Range Mark
   1    1  +  Front          781       1005      225
   2    1  +  Back        1113       2349     1237
   2    2  +  Last       2409       2974      566
   3    1  -  Last       2977       3169      193
   3    2  -  Back       3250       3390      141

desired output:
Code:
HAC_001-type01-positive-Front       808      1083  +1
HAC_002-type01-positive-Front      1373      1636  +1
HAC_003-type01-negative-Back      2047      1837  -1
BCD_001-type01-positive-Front       781      1005  +1
BCD_002-type01-positive-Back      1113      2349  +1
BCD_002-type02-positive-Last      2409      2974  +1
BCD_003-type01-negative-Last      3169      2977  -1
BCD_003-type02-negative-Back      3390      3250  -1

I would like to extract each detail and manipulate it based on my desired output.
For those with "-' at third column, it Distance_start and Distance_end should put in reversed direction.
Thanks a lot.

Last edited by patrick87; 12-14-2009 at 04:42 AM.. Reason: data edited mistakes
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

manipulate data with specific format

Hi everybody: I have a problem with how I have to manipulate the data which have specific format like this: 249. 0.30727021E+05 0.30601627E+05 0.37470780E-01 -0.44745335E+02 0.82674536E+03 248. 0.30428182E+05 0.30302787E+05 0.40564921E-01 -0.45210293E+02 ... (5 Replies)
Discussion started by: tonet
5 Replies

2. UNIX for Dummies Questions & Answers

Excel data manipulate

All, I have the following format of data in a spreadsheet A 1 2 3 4 B 1 2 3 4 where 'A' is value of 'A1', '1 2 3 4' is value of cell B1, 'B' is value of cell A2, and '1 2 3 4' is value of cell B2. There... (12 Replies)
Discussion started by: rahulrathod
12 Replies

3. Shell Programming and Scripting

how to manipulate with lines while playing with data

hello everyone, well I have a file which contains data, I want to add the data on hourly basis, like my file contains data for 24 hours, (so a total of 1440 ) lines. Now i want to add the data on hourly basis to get average values. like if I use (head) command it is ok for first go, but... (5 Replies)
Discussion started by: jojo123
5 Replies

4. Shell Programming and Scripting

Remove duplicate line detail based on column one data

My input file: AVI.out <detail>named as the RRM .</detail> AVI.out <detail>Contains 1 RRM .</detail> AR0.out <detail>named as the tellurite-resistance.</detail> AWG.out <detail>Contains 2 HTH .</detail> ADV.out <detail>named as the DENR family.</detail> ADV.out ... (10 Replies)
Discussion started by: patrick87
10 Replies

5. Shell Programming and Scripting

Way to extract detail and its content above specific value problem asking

Input file: >position_10 sample:68711 coords:5453-8666 number:3 type:complete len:344 MSINQYSSDFHYHSLMWQQQQQQQQHQNDVVEEKEALFEKPLTPSDVGKLNRLVIPKQHA ERYFPLAAAAADAVEKGLLLCFEDEEGKPWRFRYSYWNSSQSYVLTKGWSRYVKEKHLDA NRTS* >position_4 sample:68711 coords:553-866 number:4 type:partial len:483... (7 Replies)
Discussion started by: patrick87
7 Replies

6. AIX

facing problem using su

Hi, I am able to login using su - or su directly , # prompt is coming, it doesnt ask for password. any normal user on aix system is login using su - or su . Please suggest where to change the configuration direct root login is disabled in /etc/ssh/sshd_config file. (0 Replies)
Discussion started by: manoj.solaris
0 Replies

7. Shell Programming and Scripting

Help with data re-arrangement problem facing

Input file: <symbol>Q9Y8G1</symbol> <name>Q9Y8G1_EMENI</name> <symbol>Q6V953</symbol> <symbol>Q5B8K1</symbol> <name>Q6V953_EMENI</name> <symbol>G1A416</symbol> <name>G1A416_9FUNG</name> <symbol>D4N894</symbol> <name>D4N894_PLEER</name> <symbol>B0FFU4</symbol>... (13 Replies)
Discussion started by: cpp_beginner
13 Replies

8. Shell Programming and Scripting

Need help to manipulate data using script

Hi i want to manipulate my data to convert row to column name 600 Slno vlan 1 600 2 609 3 700 name 700 Slno vlan 1 600 2 609 3 700 (8 Replies)
Discussion started by: nith_anandan
8 Replies

9. Shell Programming and Scripting

awk facing delimiter inside data

Inpu file is as below: CMEOPT1_dump.1:1002 ZN:VTJ3J3C131 CMEOPT1_dump.1:1002 ZN:VTM4M4P123%5 CMEOPT1_dump.1:1002 ZN:VTM3M3P132%5 CMEOPT1_dump.2:1002 OZNG4 CMEOPT2_dump.3:1002 ZB:VTH4H4C132 CMEOPT2_dump.4:1002 ZN:VTK4K4P123 CMEOPT2_dump.5:1002 ZN:BOZ2Z2Z2P131%5 CMEOPT2_dump.5:1002 OZNG4 ... (10 Replies)
Discussion started by: zaq1xsw2
10 Replies

10. Shell Programming and Scripting

Help - manipulate data by columns and repeated

Hello good afternoon to everyone. I'm new to the forum and would like to request your help in handling data. I hope my English is clear. I have a file (Dato01.txt) to contine the following structure. # Col1 - Col2 - Col3 - Col4 Patricia started Jun 22 05:22:58 Carolina started Jun... (5 Replies)
Discussion started by: kelevra
5 Replies
GC-ANALYZE(1)								GNU							     GC-ANALYZE(1)

NAME
gc-analyze - Analyze Garbage Collector (GC) memory dumps SYNOPSIS
gc-analyze [OPTION] ... [file] DESCRIPTION
gc-analyze prints an analysis of a GC memory dump to standard out. The memory dumps may be created by calling "gnu.gcj.util.GCInfo.enumerate(String namePrefix)" from java code. A memory dump will be created on an out of memory condition if "gnu.gcj.util.GCInfo.setOOMDump(String namePrefix)" is called before the out of memory occurs. Running this program will create two files: TestDump001 and TestDump001.bytes. import gnu.gcj.util.*; import java.util.*; public class GCDumpTest { static public void main(String args[]) { ArrayList<String> l = new ArrayList<String>(1000); for (int i = 1; i < 1500; i++) { l.add("This is string #" + i); } GCInfo.enumerate("TestDump"); } } The memory dump may then be displayed by running: gc-analyze -v TestDump001 OPTIONS
--verbose -v Verbose output. -p tool-prefix Prefix added to the names of the nm and readelf commands. -d directory Directory that contains the executable and shared libraries used when the dump was generated. --help Print a help message, then exit. --version Print version information, then exit. SEE ALSO
COPYRIGHT
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page gfdl(7). (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. gcc-4.5 2010-07-05 GC-ANALYZE(1)
All times are GMT -4. The time now is 06:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy