This is a discussion on script to rewrite data. within the Shell scripting forums, part of the Development/Scripting category; I have a .txt file with numerical data in every line. how do i write a script to create a ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
I have a .txt file with numerical data in every line.
how do i write a script to create a new file with data from last to first. I mean the last data should be first in the new file, second last data should be second, etc and first data should be the last in the new file. |
| Sponsored Links | ||
|
|
|
|||
|
Sorry but i'm not getting your idea. Let us assume
File A Code:
A_Line_1 A_Line_2 A_Line_3 Code:
B_Line_1 B_Line_2 B_Line_3 Code:
B_Line_1 B_Line_2 B_Line_3 A_Line_1 A_Line_2 A_Line_3 |
|
|||
|
Quote:
Now i want the output file lets say file B as A_line3 A_line2 A_line1. thats all What should be the shell script (using sed??) to get file B? |
|
||||
|
Look like this script written by vivek may help you http://bash.cyberciti.biz/file-manag...text-file.bash
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Redirect + Rewrite Problem in Lighttpd | Lizard King | Web servers | 4 | 07-17-2007 09:44 AM |
| get data mysql from shell | alpa | Shell scripting | 1 | 05-14-2007 06:02 PM |
| Script for accessing data .. | Dastard | Shell scripting | 1 | 07-25-2006 11:12 PM |
| print data to txt | rock | Shell scripting | 1 | 03-10-2006 02:01 AM |
| Script to extract a specific row of data | ricc | Shell scripting | 1 | 11-15-2005 02:29 PM |