How to extract column consistently ?

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to extract column consistently ?
# 8  
Old 09-30-2011
Thanks to all for your help!

---------- Post updated at 03:09 PM ---------- Previous update was at 01:15 PM ----------

Hi Shell-life,

This works...Just one thing though, is it possible to keep the complete line as well? What I mean is to somehow put the complete line into a another variable? Thanks!

Originally Posted by Shell_Life
See if this helps you:
cut -c23- File | while read mFourth mRest; do
  echo ${mFourth}

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get extract and replace column with link in a column where it exists

hi i have sample data a,b,c,d,e,g h http://mysite.xyx z,b,d,f,e,s t http://123124# a,b,c,i,m,nothing d,i,j,e,w,nothing output expected is a,b,c,d,e,http://mysite.xyx z,b,d,f,e,http://123124# a,b,c,i,m,nothing d,i,j,e,w,nothing i can get only links using grep -o 'http.*' i... (8 Replies)
Discussion started by: zozoo
8 Replies

2. Shell Programming and Scripting

Extract number from column

I have a lot of file with a lot of lines following the same pattern the lines go like this: alpha_9/output- -413.74928476 2.6116 and I want it to be: 9 -413.74928476 2.6116 thanks for the help (5 Replies)
Discussion started by: galboski
5 Replies

3. UNIX for Dummies Questions & Answers

Extract column data

I have a file which extracts data from an HTML file For Eg HTML file contains: New York;ABC;145;Yes;YES;No New York;BCD;113;Yes;YES;No New York;NAS;63;Yes;YES;No ------------------------ London-48;CBT;16;Yes;YES;No London-48;CME;17;Yes;YES;No London-48;EUR;52;Yes;YES;No... (3 Replies)
Discussion started by: newkid.7955
3 Replies

4. Shell Programming and Scripting

Need to extract data from Column having variable length column

Hi , I need to extract data from below mentioned data, having no delimiter and havin no fixed column length. For example: Member nbr Ref no date 10000 1000 10202012 200000 2000 11202012 Output: to update DB with memeber nbr on basis of ref no. ... (6 Replies)
Discussion started by: ns64110
6 Replies

5. Shell Programming and Scripting

for each different entry in column 1 extract maximum values from column 2 in unix/awk

Hello, I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2 SDF4 -0.211654 SDF4 0.978068 ... (1 Reply)
Discussion started by: Diya123
1 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

Help-Extract the value in the first column

Hi all, I have file like the following. How can i extract the value one by one and pass it to another script using a loop. It would be a great help if someone can help me in this. 001355snap 001356mvpd 001357micr 001358mast 001359lake 001360klaa Like i have a perl script... (2 Replies)
Discussion started by: Tuxidow
2 Replies

8. UNIX for Advanced & Expert Users

How to extract a column

Hi Can anyone please correct, I have problem while trying to grep the 3rd word from the 1st column with the command cat file1.txt | awk '{print$3}' All the words are seperated by comma and not by spaces. File1.txt: abc,123,pqr.123,abc cdr,324,ads.232,123 Result required: pqr.123... (2 Replies)
Discussion started by: sureshcisco
2 Replies

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

10. Shell Programming and Scripting

column extract help

A, B, C, D, E, F, G 1, 12, 13, 100, 12345, 432, 142324 2, 432, 435, 4543, 543, 5, 436543 324, 5, 543, 4365, 43643, 436543, 436543 how to extract particular column when i need of column of A or B or C i need it to redirect into a new file. (1 Reply)
Discussion started by: cvm
1 Replies
Login or Register to Ask a Question
CPANPLUS::Shell::Default(3perl) 			 Perl Programmers Reference Guide			   CPANPLUS::Shell::Default(3perl)

CPANPLUS::Shell::Default - the default CPANPLUS shell SYNOPSIS
### loading the shell: $ cpanp # run 'cpanp' from the command line $ perl -MCPANPLUS -eshell # load the shell from the command line use CPANPLUS::Shell qw[Default]; # load this shell via the API # always done via CPANPLUS::Shell my $ui = CPANPLUS::Shell->new; $ui->shell; # run the shell $ui->dispatch_on_input( input => 'x'); # update the source using the # dispatch method ### when in the shell: ### Note that all commands can also take options. ### Look at their underlying CPANPLUS::Backend methods to see ### what options those are. cpanp> h # show help messages cpanp> ? # show help messages cpanp> m Acme # find acme modules, allows regexes cpanp> a KANE # find modules by kane, allows regexes cpanp> f Acme::Foo # get a list of all releases of Acme::Foo cpanp> i Acme::Foo # install Acme::Foo cpanp> i Acme-Foo-1.3 # install version 1.3 of Acme::Foo cpanp> i <URI> # install from URI, like cpanp> i <DIR> # install from an absolute or relative directory cpanp> i 1 3..5 # install search results 1, 3, 4 and 5 cpanp> i * # install all search results cpanp> a KANE; i *; # find modules by kane, install all results cpanp> t Acme::Foo # test Acme::Foo, without installing it cpanp> u Acme::Foo # uninstall Acme::Foo cpanp> d Acme::Foo # download Acme::Foo cpanp> z Acme::Foo # download & extract Acme::Foo, then open a # shell in the extraction directory cpanp> c Acme::Foo # get a list of test results for Acme::Foo cpanp> l Acme::Foo # view details about the Acme::Foo package cpanp> r Acme::Foo # view Acme::Foo's README file cpanp> o # get a list of all installed modules that # are out of date cpanp> o 1..3 # list uptodateness from a previous search cpanp> s conf # show config settings cpanp> s conf md5 1 # enable md5 checks cpanp> s program # show program settings cpanp> s edit # edit config file cpanp> s reconfigure # go through initial configuration again cpanp> s selfupdate # update your CPANPLUS install cpanp> s save # save config to disk cpanp> s mirrors # show currently selected mirrors cpanp> ! [PERL CODE] # execute the following perl code cpanp> b # create an autobundle for this computers # perl installation cpanp> x # reload index files (purges cache) cpanp> x --update_source # reload index files, get fresh source files cpanp> p [FILE] # print error stack (to a file) cpanp> v # show the banner cpanp> w # show last search results again cpanp> q # quit the shell cpanp> /plugins # list available plugins cpanp> /? PLUGIN # list help test of <PLUGIN> ### common options: cpanp> i ... --skiptest # skip tests cpanp> i ... --force # force all operations cpanp> i ... --verbose # run in verbose mode DESCRIPTION
This module provides the default user interface to "CPANPLUS". You can start it via the "cpanp" binary, or as detailed in the SYNOPSIS. BUG REPORTS
Please report bugs or other issues to <<gt>. AUTHOR
This module by Jos Boumans <>. COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. SEE ALSO
CPANPLUS::Shell::Classic, CPANPLUS::Shell, cpanp perl v5.14.2 2014-09-29 CPANPLUS::Shell::Default(3perl)