The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
How to reverse the contents of a file? aajan UNIX for Advanced & Expert Users 10 05-17-2008 11:03 AM
Reverse Arrange File The One UNIX for Dummies Questions & Answers 4 06-13-2007 11:57 AM
Need to read a file in reverse scorreg Shell Programming and Scripting 5 03-02-2006 12:14 AM
sort a file in reverse order frustrated1 Shell Programming and Scripting 11 09-21-2005 03:41 PM
reverse lookup file problem Westy564 IP Networking 2 01-09-2004 02:55 PM

Closed Thread
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
  #1 (permalink)  
Old 10-08-2008
RahulJoshi's Avatar
RahulJoshi RahulJoshi is offline
Registered User
  
 

Join Date: Aug 2008
Location: PUNE
Posts: 98
how to reverse file

i am using AIX -ksh
how can i reverse any file ,i have already try tac cmd it is not in AIX:
please help me out.
  #2 (permalink)  
Old 10-08-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
This will slurp the whole file into memory, but for modest-size files, it should work fine.

Code:
perl -e 'print reverse <>' file
  #3 (permalink)  
Old 10-08-2008
scorpio scorpio is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 41
Thnks Era .. Its working fine for me
  #4 (permalink)  
Old 10-08-2008
RahulJoshi's Avatar
RahulJoshi RahulJoshi is offline
Registered User
  
 

Join Date: Aug 2008
Location: PUNE
Posts: 98
thanks era its working.
Closed Thread

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 10:44 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