The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how do i parse by specific column? kmaq7621 Shell Programming and Scripting 2 09-02-2008 01:01 PM
subtitute specific column in line MomoChan Shell Programming and Scripting 11 08-26-2008 02:28 AM
oneliner:sing SED on a specific column chaseeem Shell Programming and Scripting 8 07-15-2008 06:10 AM
How to extract first column with a specific character selamba_warrior Shell Programming and Scripting 3 05-22-2008 05:14 AM
How to read a specific column into variable victorcheung Shell Programming and Scripting 2 04-18-2008 01:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-25-2008
sfaqih sfaqih is offline
Registered User
  
 

Join Date: Oct 2007
Location: Yemen
Posts: 19
cut a specific value from a column

Dear Friends,

I have an output like this:

7072;0;7072901
7072;1001;7072902
7072;101;7072903
7072;102;7072904
7072;1101;7072905
7072;1301;7072906
7072;1401;7072907
7072;162;7072908
7072;1;7072909

and I need to print the value in the column 3 , row number 1. which is 7072901 only. please
  #2 (permalink)  
Old 10-25-2008
redoubtable redoubtable is offline
Registered User
  
 

Join Date: Aug 2008
Location: Portugal
Posts: 242
awk -F";" 'NR == 1 { print $3 }' your-filename
  #3 (permalink)  
Old 10-25-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
An approach

Code:
>head -1 myfile | cut -d";" -f3
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0