Sponsored Content
Top Forums Shell Programming and Scripting To extract last column of file Post 302368552 by Dedalus on Thursday 5th of November 2009 04:17:55 AM
Old 11-05-2009
hi

you mean this?

Code:
awk '{print $NF}'  file

bye

D
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I need to extract last column of a file and compare the values

Hi, I am new to unix and I need help in solving below mentioned issue, really appreciate ur help. I have a file sam, john, 2324, 07142007 tom, thomson, 2343, 07142007 john, scott, 2478, 07142007 its a comma delimited file, I need to extract the last column from each line and this... (4 Replies)
Discussion started by: vukkusila
4 Replies

2. UNIX for Dummies Questions & Answers

Extract column data from File

I have a file containing the lines similar to the following entries: File1.txt: ..... -rw-r--r-- 1 root staff 4110 Aug 7 17:02 XXX_OrderNum1_date1_time1.txt -rw-r--r-- 1 root staff 4110 Aug 7 17:02 XXX_OrderNum2_date2_time1.txt -rw-r--r-- 1 root staff ... (3 Replies)
Discussion started by: sudheshnaiyer
3 Replies

3. Shell Programming and Scripting

How to extract only first column from the file

Dear All, I have a file name pointer.unl. It's contains the information below: O|A|4560333089|PBS|AU1|01/04/2003|30/04/2006|D|IGCD| O|A|4562222089|PBN|AU1|01/02/2006|31/01/2008|D|04065432| O|A|3454d00089|PKR|AU1|01/03/2008||R|sdcdc| I only need to extract first... (11 Replies)
Discussion started by: selamba_warrior
11 Replies

4. UNIX for Dummies Questions & Answers

Extract records by column value - file non-delimited

the data in my file is has no delimiters. it looks like this: H52082320024740010PH333200612290000930 0.0020080131 D5208232002474000120070306200703060580T1502 TT 1.00 H52082320029180003PH333200702150001 30 100.0020080205 D5208232002918000120070726200707260580T1502 ... (3 Replies)
Discussion started by: jclanc8
3 Replies

5. UNIX for Dummies Questions & Answers

How to extract one column from csv file in perl?

Hi everyone, i am new to perl programming, i have a problem in extracting single column from csv file. the column is the 20th column, please help me.. at present i use this code #!C:/perl/bin use warnings; use strict; my $file1 = $ARGV; open FILE1, "<$file1" or die "Can't... (13 Replies)
Discussion started by: kvth
13 Replies

6. Shell Programming and Scripting

Extract column to a new file

Hi All, Using below command to extract text from a file grep -E "^.{20}5004" filename.rtf >> 5004This will give all lines with text 5004 starting at position 20. The file filename.rtf contains several rows (millions). The four characters starting from 20 position is repeating in several... (4 Replies)
Discussion started by: hsehdar
4 Replies

7. 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

8. Shell Programming and Scripting

I need extract column pattern in file

Hi, it's my first time in this site. I've a file that look likes Edges 21 82 Edges 3 22 Edges 34 12 Edges 1 24 Edges 6 2 Edges 12 22 etc. I need extract just the second and third column with the space between them. Thanks:) Please use code tags next time for your code and data. (4 Replies)
Discussion started by: iMunk
4 Replies

9. Shell Programming and Scripting

Perl - Extract first column from file

Hi, I want to extract first column from a file and redirect the output to another file in perl. I am able to do this from command line by executing below commands. perl -anle 'print $F' Input.dat > Output.dat perl -ne '@F = split("\t", $_); print "$F\n";' Input.dat > Output.dat perl -anE... (7 Replies)
Discussion started by: Neethu
7 Replies

10. UNIX for Beginners Questions & Answers

Extract a column and multiple by 1000 and replace it on same file

Hi All, I need to extract a position in the file and multiple the value by 1000 and the replace it . Original 0010001200084701217637306521200000000000010010000000 ---> 000847 * 1000 0010012700086001213437404323000000000000001001000000 ---> 000860 * 1000... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
cdk_position(3) 					     Library Functions Manual						   cdk_position(3)

NAME
cdk_position - curses widget positioning key-bindings SYNOPSIS
Position methods for the Cdk widgets allow the user to move the widget around the screen via the cursor/keypad keys. DESCRIPTION
The following key bindings can be used to move the widget around the screen. +---------------------------------------------------------------+ |Key Action | +---------------------------------------------------------------+ |Up Arrow Moves the widget up one row. | |Down Arrow Moves the widget down one row. | |Left Arrow Moves the widget left one column | |Right Arrow Moves the widget right one column | |1 Moves the widget down one row and left one | | column. | |2 Moves the widget down one row. | |3 Moves the widget down one row and right one | | column. | |4 Moves the widget left one column | |5 Centers the widget both vertically and hori- | | zontally. | |6 Moves the widget right one column | |7 Moves the widget up one row and left one | | column. | |8 Moves the widget up one row. | |9 Moves the widget up one row and right one | | column. | |t Moves the widget to the top of the screen. | |b Moves the widget to the bottom of the | | screen. | |l Moves the widget to the left of the screen. | |r Moves the widget to the right of the screen. | |c Centers the widget between the left and | | right of the window. | |C Centers the widget between the top and bot- | | tom of the window. | |Escape Returns the widget to its original position. | |Return Exits the function and leaves the wid- | | getwhere it was. | +---------------------------------------------------------------+ +---------------------------------------------------------------+ The numbers 0-9 are chosen to correspond to the numeric keypad on your terminal. Cdk does not handle the application mode keypad control sequences, since those are not defined via terminfo. To use the numeric keypad you should ensure that it is in normal (or NumLock) mode. SEE ALSO
cdk(3), cdk_binding(3), cdk_display(3), cdk_screen(3) cdk_position(3)
All times are GMT -4. The time now is 11:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy