The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Splitting input files into multiple files through AWK command arund_01 Shell Programming and Scripting 3 05-13-2008 06:17 AM
Find duplicates from multuple files with 2 diff types of files ricky007 Shell Programming and Scripting 2 03-04-2008 10:46 AM
unzip particular gzip files among the normal data files thepurple Shell Programming and Scripting 4 11-30-2007 08:17 AM
when I try to run rm on multiple files I have problem to delete files with space umen UNIX for Dummies Questions & Answers 1 09-20-2005 12:20 AM
text files, ASCII files, binary files and ftp transfers Perderabo Answers to Frequently Asked Questions 0 04-08-2004 01:25 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 11-16-2006
Registered User
 

Join Date: Nov 2006
Posts: 52
regarding files

i want to read the file from EOF to 1st line of the file .
is there anyway to do this.
sree
Reply With Quote
Forum Sponsor
  #2  
Old 11-17-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,274
You mean you want to reverse the order of the lines in a file? try tac
Reply With Quote
  #3  
Old 11-17-2006
Registered User
 

Join Date: Nov 2006
Posts: 52
thank u

can u tell about tac
how we can use tac
Reply With Quote
  #4  
Old 11-17-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,274
try man tac

It's possible your system does not have it. to see if it is on your box try this command:
Code:
which tac
Reply With Quote
  #5  
Old 11-17-2006
Registered User
 

Join Date: Nov 2006
Posts: 52
but i wnat to get the lines from last to 1st programatically
in my system tac is there.
Reply With Quote
  #6  
Old 11-17-2006
Registered User
 

Join Date: Oct 2002
Posts: 676
Try sed:

Code:
sed -n '1!G;h;$p' <filename>
Reply With Quote
  #7  
Old 11-17-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,683
This thread looks like an extension of mozilla object
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0