![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to replace a specific word in specific column? | ./hari.sh | Shell Programming and Scripting | 6 | 03-07-2009 09:33 AM |
| 4 column tsv file, output 1 specific column | casphar | Shell Programming and Scripting | 6 | 11-12-2008 04:04 PM |
| cut a specific value from a column | sfaqih | UNIX for Advanced & Expert Users | 2 | 10-25-2008 07:08 AM |
| how do i parse by specific column? | kmaq7621 | Shell Programming and Scripting | 2 | 09-02-2008 02:01 PM |
| subtitute specific column in line | MomoChan | Shell Programming and Scripting | 11 | 08-26-2008 03:28 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
grabbing specific column perl
Alright,
I'm new to Perl so be gentle. Given the following script: ---- open(file, "<file.txt"); @lines = <file>; close(file); $var = print $lines[18]; ---- So I'm printing line 18 of the file "file.txt". I now want the 5th column, minus the forward slash. The line looks like this: TUV 1/ 3.2/ 4.5/ 3.1/ I tried doing: print $var | perl -pae '$_="$F[5]\n"';, but i get garbage. thanks in advance. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|