Sponsored Content
Full Discussion: replace row separated by tab
Top Forums Shell Programming and Scripting replace row separated by tab Post 302577599 by Gery on Tuesday 29th of November 2011 11:57:54 AM
Old 11-29-2011
thanks, and sorry for confusing you, this is the input:

Code:
-0.969995498657         255     116     116     -0.0595171749592        255     116     116 
-0.0595171749592        255     235     235     -0.0372283123434        255     235     235 
-0.0372283123434        255     239     239     -0.0261037815362        255     239     239 
-0.0261037815362        255     242     242     -0.0189793556929        255     242     242 
-0.0189793556929        255     243     243     -0.0136750303209        255     243     243 
-0.0136750303209        255     244     244     -0.00929261557758       255     244     244 
-0.00929261557758       255     245     245     -0.00541243888438       255     245     245 
-0.00541243888438       255     246     246     -0.00177605159115       255     246     246 
-0.00177605159115       255     247     247     0                       255     247     247 
0                       255     248     248     0.00183262955397        255     248     248 
0.00183262955397        255     248     248     0.0054667154327         255     248     248 
0.0054667154327         255     249     249     0.00935688894242        255     249     249
0.00935688894242        255     250     250     0.0137680023909         255     250     250
0.0137680023909         255     252     252     0.0191160235554         255     252     252
0.0191160235554         255     253     253     0.0262850597501         255     253     253
0.0262850597501         255     255     255     0.0375966504216         255     255     255
0.0375966504216         250     250     255     0.059996701777          250     250     255
0.059996701777          124     124     255     1.03000569344           124     124     255

and this is the output:

Code:
-0.969995498657         0       0       0       -0.0595171749592          0       0       0 
-0.0595171749592        255     235     235     -0.0372283123434        255     235     235 
-0.0372283123434        255     239     239     -0.0261037815362        255     239     239 
-0.0261037815362        255     242     242     -0.0189793556929        255     242     242 
-0.0189793556929        255     243     243     -0.0136750303209         255     243     243
-0.0136750303209        255     244     244     -0.00929261557758       255     244     244 
-0.00929261557758       255     245     245     -0.00541243888438      255     245     245 
-0.00541243888438       255     246     246     -0.00177605159115       255     246     246 
-0.00177605159115       255     247     247     0                       255     247     247 
0                       255     248     248     0.00183262955397        255     248     248
0.00183262955397        255     248     248     0.0054667154327         255     248     248
0.0054667154327         255     249     249     0.00935688894242        255     249     249
0.00935688894242        255     250     250     0.0137680023909         255     250     250
0.0137680023909         255     252     252     0.0191160235554         255     252     252
0.0191160235554         255     253     253     0.0262850597501         255     253     253
0.0262850597501         255     255     255     0.0375966504216         255     255     255
0.0375966504216         250     250     255     0.059996701777          250     250     255
0.059996701777          255     255     0       1.03000569344           255     255     0


Last edited by Gery; 11-29-2011 at 01:12 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parse file into tab separated columns

Hello, I am trying to parse a file that resembles the last three groupings into something looking like the first two lines. I've fiddled with sed and awk a bit, but can't get anything to work properly. I need them separated by some delimiter. The file is some 23,000 lines of the stuff.... ... (9 Replies)
Discussion started by: dkozel
9 Replies

2. Shell Programming and Scripting

Compare two columns separated by a tab

witam potrzebuje polecenia porownujacego koumny na podstawie n-ostatnich znakow danej linnijki tj mam 2 koumny AiB zawierajace ciag dowolnych znakow (dlugosci w kazdej linijce mga byc rozne wiec uzycie substra odpada) A B ewewewabc nbgujnnabc... (3 Replies)
Discussion started by: Toudi
3 Replies

3. Shell Programming and Scripting

Convert a tab separated file using bash

Dear all, I have a file in this format (like a matrix) - A B C .. X A 1 4 2 .. 2 B 2 6 4 .. 8 C 3 5 5 .. 4 . . . ... . X . . ... . and want to convert it into a file with this format: A A = 1 A B = 4 A C = 2 ... A X = 2 B A = 2 B B = 6 etc (2 Replies)
Discussion started by: TheTransporter
2 Replies

4. UNIX for Dummies Questions & Answers

tab-separated file to matrix conversion

hello all, i have an input file like that A A X0 A B X1 A C X2 ... A Z Xx B A X1 B B X3 .... Z A Xx Z B X4 and i want to have an output like that A B C D A X0 X1 X2 Xy B X1 X3 X4 (4 Replies)
Discussion started by: TheTransporter
4 Replies

5. UNIX for Dummies Questions & Answers

Filling a tab-separated file with known missing entries in columns

Hello all, I have a file which is tab separated like that: PHE_205_A TIP_127_W ARG_150_B MET_1150_A TIP_12_W VAL_11_B GLU_60_A TIP_130_W ARG_143_B LEU_1033_A TIP_203_W ARG_14_B SER_1092_A TIP_203_W THR_1090_A TIP_203_W SER_1092_A TIP_25_W ... (6 Replies)
Discussion started by: TheTransporter
6 Replies

6. Shell Programming and Scripting

Problem with a tab separated file

Hi, I have created a tab separated file from the following input file. ADDRESS1 CITY STATE POSTAL COUNTRY LON LAT 32 PRINZREGENTENSTRASSE ROSENHEIM BAYERN 83022 DEU 1212182 4785699 263 VIA DANTE ALIGHIERI BARI PUGLIA 70122 ITA 1686233 4112154 30 VIA MILANO ... (1 Reply)
Discussion started by: ramky79
1 Replies

7. Shell Programming and Scripting

Merging two tab separated files via nawk

I searched a lot considering this theme,but still cant make my code working. I have two tab separated files, I want to do the following thing: File 1: xx1 y yy xx2 y yy xx3 y yy xx4 y yy File 2: xx1 z1 xx2 z2 xx3 z3 xx4 z4 xx5 z5 So I want to merge them ,according to... (9 Replies)
Discussion started by: divergenciya
9 Replies

8. Shell Programming and Scripting

How to replace & with and in tab separated file?

Hi, I have a tab separated. I want to replace all the "&" in 8th column of the file with "and" .I am trying with awk -F, -vOFS=\\t '{$8=($8=="&")?"and":$8}1' test> test1.txt My file is abc def ghk hjk lkm hgb jkluy acvf & bhj hihuhu fgg me mine he her go went has has & had hgf hgy ... (1 Reply)
Discussion started by: jagdishrout
1 Replies

9. Shell Programming and Scripting

Read a tab separated file with empty column

Hi all, I'm trying to read a tab separated file and apply some functions on each column. I have an issue with empty column. Exemple: $ #cat with the sed to allow you to see my tab $ cat foo.txt| sed 's/\t/;/g' a;1;x b;;yI wanted to something like that: while read col1 col2 col3 do ... (4 Replies)
Discussion started by: maturix
4 Replies

10. Shell Programming and Scripting

Gawk output separated by tab

In the gawk below, I am trying to output the file tab-deliminated but don't think that is the correct syntax. Thank you :). gawk OFS='/t' '{sub(/-+/,"",$2); ar=$0} END{n = asort(ar) for (i = 1; i <= n; i++) print ar}' file (2 Replies)
Discussion started by: cmccabe
2 Replies
XmAddTabGroup(3X)														 XmAddTabGroup(3X)

NAME
XmAddTabGroup - A function that adds a manager or a primitive widget to the list of tab groups SYNOPSIS
#include <Xm/Xm.h> void XmAddTabGroup (tab_group) Widget tab_group; DESCRIPTION
This function is obsolete and its behavior is replaced by setting XmNnavigationType to XmEXCLUSIVE_TAB_GROUP. When using the keyboard to traverse through a widget hierarchy, primitive or manager widgets are grouped together into what are known as tab groups. Any manager or primitive widget can be a tab group. Within a tab group, move the focus to the next widget within the tab group by using the arrow keys. To move to another tab group, use KNextField or KPrevField. Tab groups are ordinarily specified by the XmNnavigationType resource. XmAddTabGroup is called to control the order of traversal of tab groups. The widget specified by tab_group is appended to the list of tab groups to be traversed, and the widget's XmNnavigationType is set to XmEXCLUSIVE_TAB_GROUP. Specifies the manager or primitive widget ID. SEE ALSO
XmManager(3X), XmGetTabGroup(3X), XmPrimitive(3X), XmRemoveTabGroup(3X) XmAddTabGroup(3X)
All times are GMT -4. The time now is 05:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy