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
creating a file in reverse order of another file srilaxmi Shell Programming and Scripting 3 11-28-2008 12:54 AM
sort -reverse order sivakumar.rj UNIX for Dummies Questions & Answers 7 09-23-2008 11:43 PM
read line in reverse order from file jaydeep_sadaria Shell Programming and Scripting 2 08-13-2008 04:53 AM
sort a file in reverse order frustrated1 Shell Programming and Scripting 11 09-21-2005 04:41 PM
using sed and regex to reverse order??? urtherhoda UNIX for Dummies Questions & Answers 2 10-13-2004 11:57 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 02-14-2009
perlrookie perlrookie is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 5
Conditional reverse of certain file line order

Hi I am brand new to programming, I dont know how to go about this task, or what language is best for this...If there is an easy solution in different languages, I would love to see them. I want to learn about the steps to take on this, so Please put in comments where code is used.
I believe in the old addage, "teach a man to fish and he is fed for life"
Thank you all in advance.

I have a file that need to have some of the lines' ordering switched.
When the (x)coordinate (x,y)is even integer, need to reverse line order.

starting file
'some value' 1,1
'some value' 1,4
'some value' 1,6
'some value' 2,4
'some value' 2,5
'some value' 3,1
'some value' 4,1
'some value' 4,4
'some value' 4,8
'some value' 5,4

New File
'some value' 1,1
'some value' 1,4
'some value' 1,6
'some value' 2,5
'some value' 2,4
'some value' 3,1
'some value' 4,8
'some value' 4,4
'some value' 4,1
'some value' 5,4

Thank you all in advance for any help
 

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 02:06 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