Sponsored Content
Top Forums Shell Programming and Scripting Delete an entire column from a tab delimited file Post 302783293 by chidori on Wednesday 20th of March 2013 08:12:07 AM
Old 03-20-2013
please give a try with this oneliner

Code:
nawk '{$1="";print}' input_file.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete parts of a string of character in one given column of a tab delimited file

I would like to remove characters from column 7 so that from an input file looking like this: >HWI-EAS422_12:4:1:69:89 GGTTTAAATATTGCACAAAAGGTATAGAGCGT U0 1 0 0 ref_chr8.fa 6527777 F DD I get something like that in an output file: ... (13 Replies)
Discussion started by: matlavmac
13 Replies

2. Shell Programming and Scripting

Delete first column in tab-delimited text-file

I have a large text-file with tab-delimited genetic data that looks like: KSC112 KSC234 0 0 1 1 A G C T I simply wan to delete the first column, but since the file has 600 000 columns, it is not possible with awk (seems to be limited at 32k columns). Does anyone have an idea how to do this? (2 Replies)
Discussion started by: andmal
2 Replies

3. UNIX for Dummies Questions & Answers

Add a new column to a tab delimited text file

I want to add a new column to a tab delimited text file. It will be the first column and it will just be 1's. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

4. Shell Programming and Scripting

Using sed on 1st column of tab delimited file

Hi all, I'm new to Unix and work primarily in bioinformatics. I am in need of a script which will allow me to replace "1" with "chr1" in only the first column of a file which looks like such: 1 10327 rs112750067 T C . PASS ASP;RSPOS=10327;... (4 Replies)
Discussion started by: Hkins552
4 Replies

5. Shell Programming and Scripting

Extract second column tab delimited file

I have a file which looks like this: 73450 articles and news developmental psychology 2006-03-30 16:22:40 1 http://www.usnews.com 73450 articles and news developmental psychology 2006-03-30 16:22:40 2 http://www.apa.org 73450 articles and news developmental psychology 2006-03-30... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

6. UNIX for Dummies Questions & Answers

add (append) a column in a tab delimited file

I have a file having the following entries: test1 test2 test3 11 22 33 22 44 66 99 99 44 --- I want to add a column so that the above file becomes: test1 test2 test3 notest 11 22 33 * 22 44 66 * 99 99 44 * --- Thanks (6 Replies)
Discussion started by: mary271
6 Replies

7. Shell Programming and Scripting

Parse tab delimited file, check condition and delete row

I am fairly new to programming and trying to resolve this problem. I have the file like this. CHROM POS REF ALT 10_sample.bam 11_sample.bam 12_sample.bam 13_sample.bam 14_sample.bam 15_sample.bam 16_sample.bam tg93 77 T C T T T T T tg93 79 ... (4 Replies)
Discussion started by: empyrean
4 Replies

8. Shell Programming and Scripting

Convert a 3 column tab delimited file to a matrix

Hi all, I have a 3 columns input file like this: CPLX9PC-4943 CPLX9PC-4943 1 CPLX9PC-4943 CpxID123 0 CPLX9PC-4943 CpxID126 0 CPLX9PC-4943 CPLX9PC-5763 0.5 CPLX9PC-4943 CpxID13 0 CPLX9PC-4943 CPLX9PC-6163 0 CPLX9PC-4943 CPLX9PC-6164 0.04... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

9. Shell Programming and Scripting

Delete and insert columns in a tab delimited file

Hi all , I have a file having 12 columns tab delimited . I need to read this file and remove the column 3 and column 4 and insert a word in column 3 as "AVIALABLE " Is there a way to do this . I am trying like below Thanks DJ cat $FILENAME|awk -F"\t" '{ print $1 "\t... (3 Replies)
Discussion started by: Hypesslearner
3 Replies

10. UNIX for Beginners Questions & Answers

Replace a column in tab delimited file with column in other tab delimited file,based on match

Hello Everyone.. I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files FileP.txt ... (2 Replies)
Discussion started by: YogeshG
2 Replies
XmProcessTraversal(library call)										  XmProcessTraversal(library call)

NAME
XmProcessTraversal -- A function that determines which component receives keyboard events when a widget has the focus SYNOPSIS
#include <Xm/Xm.h> Boolean XmProcessTraversal( Widget widget, XmTraversalDirection direction); DESCRIPTION
XmProcessTraversal determines which component of a hierarchy receives keyboard events when the hierarchy that contains the given widget has keyboard focus. XmProcessTraversal changes focus only when the keyboard focus policy of the widget hierarchy is explicit. If the XmNkeyboardFocusPolicy of the nearest shell ancestor of the given widget is not XmEXPLICIT, XmProcessTraversal returns False without making any focus changes. widget Specifies the widget ID of the widget whose hierarchy is to be traversed direction Specifies the direction of traversal DEFINITIONS In order to be eligible to receive keyboard focus when the shell's XmNkeyboardFocusPolicy is XmEXPLICIT, a widget or gadget must meet the following conditions: o The widget and its ancestors are not in the process of being destroyed. o The widget and its ancestors are sensitive. A widget is sensitive when its XmNsensitive and XmNancestorSensitive resources are both True. o The XmNtraversalOn resource for the widget and its ancestors is True. o The widget is viewable. This means that the widget and its ancestors are managed, realized, and (except for gadgets) mapped. Fur- thermore, in general, some part of the widget's rectangular area must be unobscured by the widget's ancestors. If an application unmaps a widget that has its XmNmappedWhenManaged resource set to True, the result is undefined. In a ScrolledWindow with an XmNscrollingPolicy of XmAUTOMATIC, a widget that is obscured because it is not within the clip window may be able to receive focus if some part of the widget is within the work area and if an XmNtraverseObscuredCallback routine can make the widget at least partially visible by scrolling the window. In general only primitives, gadgets, and Drawing Area are eligible to receive focus. Most managers cannot receive focus even if they meet all these conditions. The direction argument identifies the kind of traversal action to take. The descriptions of these actions below refer to traversable non- tab-group widgets and traversable tab groups. o A traversable non-tab-group widget is a widget that is not a tab group and that meets all the conditions for receiving focus described above. o A traversable tab group widget is a tab group widget that meets the same conditions, except that a manager that is a tab group and meets the other conditions is also eligible for traversal as long as it contains a descendant that can receive focus. A tab group is a widget whose XmNnavigationType is: o XmTAB_GROUP or XmSTICKY_TAB_GROUP, if the hierarchy (up to the nearest shell ancestor) that contains the widget has no widget whose XmNnavigationType is XmEXCLUSIVE_TAB_GROUP o XmEXCLUSIVE_TAB_GROUP or XmSTICKY_TAB_GROUP, if the hierarchy (up to the nearest shell ancestor) that contains the widget has any widget whose XmNnavigationType is XmEXCLUSIVE_TAB_GROUP TRAVERSAL ACTIONS The hierarchy to be traversed is that containing the widget argument. This hierarchy is traversed only up to the nearest shell; XmPro- cessTraversal does not move focus from one shell to another. If the shell containing widget does not currently have the focus, any change that XmProcessTraversal makes to the element with focus within that shell does not take effect until the next time the shell receives focus. XmProcessTraversal begins the traversal action from the widget in the hierarchy that currently has keyboard focus or that last had focus when the user traversed away from the shell hierarchy. The value of the direction argument determines which of three kinds of traversal action to take: o Traversal to a non-tab-group widget. This kind of traversal is possible only when the widget that currently has focus is not a tab group; otherwise, XmProcessTraversal returns False for these actions. These actions do not move focus from one tab group to another. The actions first determine the containing tab group. This is the tab group containing the widget that currently has focus. The actions traverse only to a non-tab-group widget within the containing tab group. A non-tab-group widget is eligible for this kind of traversal if the widget is traversable and has no tab group ancestors up to the containing tab group. If the tab group contains no traversable non-tab-group widgets, XmProcessTraversal returns False. Following are the possible values of the direction argument. Note that when actions wrap, wrapping occurs in the traversal direction. The following describes what happens in a left to right environment: o XmTRAVERSE_RIGHT--If the XmNnavigationType of the containing tab group is not XmEXCLUSIVE_TAB_GROUP, focus moves to the next traversable non-tab-group widget to the right of the widget that currently has focus. In a left to right environment, at the right side of the tab group this action wraps to the non-tab-group widget at the left side and next toward the bot- tom. At the rightmost widget in the bottom row of the tab group this action wraps to the non-tab-group widget at the left- most widget in the upper row. In a right to left environment, at the right side of the tab group, this action wraps to the non-tab-group widget at the left side and next toward the top. At the rightmost widget in the upper row of the tab group this action wraps to the non-tab-group widget at the leftmost widget in the bottom row. If the XmNnavigationType of the containing tab group is XmEXCLUSIVE_TAB_GROUP, focus moves to the next traversable non- tab-group widget in the tab group, proceeding in the order in which the widgets appear in their parents' XmNchildren lists. After the last widget in the tab group, this action wraps to the first non-tab-group widget. o XmTRAVERSE_LEFT--If the XmNnavigationType of the containing tab group is not XmEXCLUSIVE_TAB_GROUP, focus moves to the next traversable non-tab-group widget to the left of the widget that currently has focus. In a left to right environment, at the left side of the tab group this action wraps to the non-tab-group widget at the right side and next toward the top. At the leftmost widget in the upper row of the tab group this action wraps to the non-tab-group widget at the rightmost widget in the bottom row. In a right to left environment, at the left side of the tab group this action wraps to the non-tab-group widget at the right side and next toward the bottom. At the leftmost widget in the bottom row of the tab group this action wraps to the non-tab-group widget at the rightmost widget in the upper row. If the XmNnavigationType of the containing tab group is XmEXCLUSIVE_TAB_GROUP, focus moves to the previous traversable non-tab-group widget in the tab group, proceeding in the reverse order in which the widgets appear in their parents' XmNchildren lists. After the first widget in the tab group, this action wraps to the last non-tab-group widget. o XmTRAVERSE_DOWN--If the XmNnavigationType of the containing tab group is not XmEXCLUSIVE_TAB_GROUP, focus moves to the next traversable non-tab-group widget below the widget that currently has focus. In a left to right environment, at the bottom of the tab group this action wraps to the non-tab-group widget at the top and next toward the right. At the bottom widget in the rightmost column of the tab group this action wraps to the non-tab-group widget at the top widget in the leftmost column. In a right to left environment, at the bottom of the tab group this action wraps to the non-tab-group widget at the top and next toward the left. At the bottom widget of the leftmost widget of the tab group this action wraps to the non- tab-group widget at the top widget of the rightmost column. If the XmNnavigationType of the containing tab group is XmEXCLUSIVE_TAB_GROUP, focus moves to the next traversable non- tab-group widget in the tab group, proceeding in the order in which the widgets appear in their parents' XmNchildren lists. After the last widget in the tab group, this action wraps to the first non-tab-group widget. o XmTRAVERSE_UP--If the XmNnavigationType of the containing tab group is not XmEXCLUSIVE_TAB_GROUP, focus moves to the next traversable non-tab-group widget above the widget that currently has focus. In a left to right environment, at the top of the tab group this action wraps to the non-tab-group widget at the bottom and next toward the left. At the top widget of the leftmost column of the tab group this action wraps to the non-tab-group widget at the bottom widget of the rightmost column. In a right to left environment, at the top of the tab group this action wraps to the non-tab-group widget at the bottom and next toward the right. At the top widget of the right most column of the tab group this action wraps to the non- tab-group widget at the bottom widget of the leftmost column. If the XmNnavigationType of the containing tab group is XmEXCLUSIVE_TAB_GROUP, focus moves to the previous traversable non-tab-group widget in the tab group, proceeding in the reverse order in which the widgets appear in their parents' XmNchildren lists. After the first widget in the tab group, this action wraps to the last non-tab-group widget. o XmTRAVERSE_NEXT--Focus moves to the next traversable non-tab-group widget in the tab group, proceeding in the order in which the widgets appear in their parents' XmNchildren lists. After the last widget in the tab group, this action wraps to the first non-tab-group widget. o XmTRAVERSE_PREV--Focus moves to the previous traversable non-tab-group widget in the tab group, proceeding in the reverse order in which the widgets appear in their parents' XmNchildren lists. After the first widget in the tab group, this action wraps to the last non-tab-group widget. o XmTRAVERSE_HOME--If the XmNnavigationType of the containing tab group is not XmEXCLUSIVE_TAB_GROUP, focus moves to the first traversable non-tab-group widget at the initial focus of the tab group. If the XmNnavigationType of the containing tab group is XmEXCLUSIVE_TAB_GROUP, focus moves to the first traversable non-tab-group widget in the tab group, according to the order in which the widgets appear in their parents' XmNchildren lists. o Traversal to a tab group. These actions first determine the current widget hierarchy and the containing tab group. The current wid- get hierarchy is the widget hierarchy whose root is the nearest shell ancestor of the widget that currently has focus. The contain- ing tab group is is the tab group containing the widget that currently has focus. If the current widget hierarchy contains no tra- versable tab groups, XmProcessTraversal returns False. Following are the possible values of the direction argument. If any tab group in the current widget hierarchy has an XmNnaviga- tionType of XmEXCLUSIVE_TAB_GROUP, traversal of tab groups in the hierarchy proceeds to widgets in the order in which their XmN- navigationType resources were specified as XmEXCLUSIVE_TAB_GROUP or XmSTICKY_TAB_GROUP.: o XmTRAVERSE_NEXT_TAB_GROUP--Finds the hierarchy that contains widget, finds the active tab group (if any), and makes the next tab group the active tab group in the hierarchy. o XmTRAVERSE_PREV_TAB_GROUP--Finds the hierarchy that contains widget, finds the active tab group (if any), and makes the previous tab group the active tab group in the hierarchy. o Traversal to any widget. In this case the widget argument is the widget to which XmProcessTraversal tries to give focus. If the widget is not traversable, XmProcessTraversal returns False. Following are the possible values of the direction argument: o XmTRAVERSE_CURRENT--Finds the hierarchy and the tab group that contain widget. If this tab group is not the active tab group, this action makes it the active tab group. If widget is an item in the active tab group, this action makes it the active item. If widget is the active tab group, this action makes the first traversable item in the tab group the active item. CAUTIONS Using XmProcessTraversal to traverse to MenuBars, Pulldown menu panes, or Popup menu panes is not supported. XmProcessTraversal cannot be called recursively. In particular, an application cannot call this routine from an XmNfocusCallback or XmN- losingFocusCallback procedure. RETURN
Returns True if the traversal action succeeded. Returns False if the XmNkeyboardFocusPolicy of the nearest shell ancestor of widget is not XmEXPLICIT, if the traversal action finds no traversable widget to receive focus, or if the call to the routine has invalid arguments. RELATED
XmGetVisibility(3) and XmIsTraversable(3). XmProcessTraversal(library call)
All times are GMT -4. The time now is 09:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy