Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sorting columns for specific values Post 302780377 by Corona688 on Thursday 14th of March 2013 12:39:03 PM
Old 03-14-2013
Quote:
Originally Posted by AAWT
Yes it is an excel file
Quote:
this is actually a tab delimited text file
These are not the same thing. Knowing it's tab-delimited text is good.

Knowing which column you wanted would also be nice... I'm assuming it's the first and only column, but 'tab separated' has little meaning when there's no columns!

Code:
awk -F"-" '{ print $2 }' inputfile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting multi-column values from a specific file

Hi, all. I need a shell script which gathers data from a remote XML file and then displays it according to my needs.. I need this for my job due to the fact that I need to keep track price changes of euro, usd, gold, etc. The XML file I am talking about is located at this page: cnnturk dot... (4 Replies)
Discussion started by: canimsin
4 Replies

2. Shell Programming and Scripting

Get values from different columns from file2 when match values of file1

Hi everyone, I have file1 and file2 comma separated both. file1 is: Header1,Header2,Header3,Header4,Header5,Header6,Header7,Header8,Header9,Header10 Code7,,,,,,,,, Code5,,,,,,,,, Code3,,,,,,,,, Code9,,,,,,,,, Code2,,,,,,,,,file2... (17 Replies)
Discussion started by: cgkmal
17 Replies

3. UNIX for Dummies Questions & Answers

Removing columns from a text file that do not have any values in second and third columns

I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns: 4 0.04972604 KLHL28 4 0.0497332 CSTB 4 0.04979822 AIF1 4 0.04983331 DECR2 4 0.04990344 KATNB1 4 4 4 4 How can I remove the trailing... (3 Replies)
Discussion started by: evelibertine
3 Replies

4. Shell Programming and Scripting

sorting and adding columns

i have a file with two columns, and i want to uniquely sort the values in fist column and add the corresponding values in the second columns eg file a contents tom 200 john 300 sow 500 tom 800 james 50 sow 300 output shpould be in file b as tom 1000 john 300 sow 800 james 50 (0 Replies)
Discussion started by: dealerso
0 Replies

5. Shell Programming and Scripting

Print columns matching to specific values

Hello Friends, I have a CDR file and i need to print out 2 columns with their field position which matches to some constant values, a part of input file CZ=1|CZA=1|DIAL=415483420001|EE=13|ESF=1|ET=|FF=0|9|MNC=99|MNP=9041|MTC=0|NID=2|NOA=international|ON=1| OutPut ... (3 Replies)
Discussion started by: EAGL€
3 Replies

6. Shell Programming and Scripting

Help in sorting multiple columns

Hello all, I am using printf to print the sorted o/p in my script.I am trying to sort in following way but doesn't work. printf "%13s %2s UDP %15s:%s Program %4s HD: %23s HD: %23s %10s %s %s %3s days %3s hours\n" $encoder $i "${ipaddr}" ${portno} ${progno} ${inres} ${outres} ${inrate}... (4 Replies)
Discussion started by: ramman
4 Replies

7. Shell Programming and Scripting

Can't figure out how to find specific characters in specific columns

I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes. Is there a search for that? I tried cut but couldn't get it to work. Ex. I want to find '9999' in column 265 for 4 bytes. If it is in there, I want it to print... (12 Replies)
Discussion started by: Drenhead
12 Replies

8. Shell Programming and Scripting

Adding columns with values dependent on existing columns

Hello I have a file as below chr1 start ref alt code1 code2 chr1 18884 C CAAAA 2 0 chr1 135419 TATACA T 2 0 chr1 332045 T TTG 0 2 chr1 453838 T TAC 2 0 chr1 567652 T TG 1 0 chr1 602541 ... (2 Replies)
Discussion started by: plumb_r
2 Replies

9. UNIX for Dummies Questions & Answers

Printing lines with specific strings at specific columns

Hi I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
Discussion started by: a_bahreini
3 Replies

10. Shell Programming and Scripting

Sorting by columns

Hi, I have a tab delimited columnar file where I want to remove lines wherever two particular columns match. so for this file, I want to toss the lines where columns 1 and 2 match: a a 1 3 a b 2 4 b b 3 5 because there are matches column 1 and 2 in lines 1 and 3, I would like a script to... (2 Replies)
Discussion started by: mikey11415
2 Replies
XmTabList(library call) 												   XmTabList(library call)

NAME
XmTabList -- Data type for a tab list SYNOPSIS
#include <Xm/Xm.h> XmTabList DESCRIPTION
XmTabList is the data type for a tab list. A tab list consists of tab stop list entries (XmTabs). Whenever a tab component is encountered while an XmString is being rendered, the origin of the next X draw depends on the next XmTab. If a tab stop would cause text to overlap, the x position for the segment is reset to follow immediately after the end of the previous segment. Tab lists are specified in resource files with the following syntax: resource_spec: tab WHITESPACE [, WHITESPACE tab ]* The resource value string consists of one or more tabs separated by commas. Each tab identifies the value of the tab, the unit type, and whether the offset is relative or absolute. For example: tab := float [ WHITESPACE units ] float := [ sign ] [[ DIGIT]*. ]DIGIT+ sign := + where the presence or absence of sign indicates, respectively, a relative offset or an absolute offset. Note that negative tab values are not allowed. units indicates the unitType to use as described in the XmConvertUnits reference page. For example, the following specifies a tab list consisting of a one inch absolute tab followed by a one inch relative tab: *tabList: 1in, +1in For resources of type, dimension, or position, you can specify units as described in the XmNunitType resource of the XmGadget, XmManager, or XmPrimitive reference page. RELATED
Refer to the Motif Programmer's Guide for more information about tabs and tab lists. XmTabListCopy(3), XmTabListFree(3), XmTabListGet- Tab(3), XmTabListInsertTabs(3), XmTabListRemoveTabs(3), XmTabListReplacePositions(3), and XmTabListTabCount(3). XmTabList(library call)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy