The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
have a file with 300 columns dummy_needhelp Shell Programming and Scripting 4 11-05-2007 01:08 AM
Urgent !!! Shell script to copy files to VSS devalin Shell Programming and Scripting 1 08-20-2007 07:16 AM
How can i replace certain columns in the file mani_um Shell Programming and Scripting 6 06-22-2007 11:40 AM
how to get the columns name and fields from this file. rnallamothu Shell Programming and Scripting 15 06-13-2007 09:14 AM
manipulate csv file to add columns oscarmon Filesystems, Disks and Memory 6 12-11-2006 09:47 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-29-2007
sai_kris_007 sai_kris_007 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 3
Copy the first & third columns in to another test file. Its very urgent please

Hello friends!
Here is the scenario.
I have a flat file named FILE1.TXT with multiple columns and comma as delimiter.
Now my task is to create another file called FILE2.TXT which contains the FIRST & THIRD column values from FILE1.TXT separated by comma.
Which mean i am creating a new files with only two columns which are 1st and 3rd. Ex:
FILE1.TXT
1,2,3,4,5,6,7,8,9
1,2,3,4,5,6,7,8,9
1,2,3,4,5,6,7,8,9
1,2,3,4,5,6,7,8,9
1,2,3,4,5,6,7,8,9

Now after creating another file FILE2.TXT it should look like this:
FILE2.TXT
1,3
1,3
1,3
1,3
1,3


Using Unix create a script for this. Please help me out as this is very urgent. I would be very greatful to you people.
 

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 09:19 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