LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   program to reverse a file (https://www.linuxquestions.org/questions/linux-newbie-8/program-to-reverse-a-file-850878/)

poonamkhirolia 12-17-2010 09:52 AM

program to reverse a file
 
Write a program in any language you choose, to reverse a file.

catkin 12-17-2010 10:10 AM

Smells like homework to me -- like the OP's other threads, 6 started in 30 minutes.

druuna 12-17-2010 10:11 AM

Hi,

If by reverse you mean last line first, first line last: Try tac (Yep, that is cat in reverse).

Hope this helps.

EDIT:
Mmmmm..... catkin seems to have a good point......
/EDIT

tsg 12-17-2010 11:25 AM

Quote:

Originally Posted by poonamkhirolia (Post 4194817)
Write a program in any language you choose, to reverse a file.

Why would I want to do that?

crts 12-17-2010 11:42 AM

Quote:

Originally Posted by tsg (Post 4194921)
Quote:

Write a program in any language you choose, to reverse a file.
Why would I want to do that?

So that you can still read the file on 'Opposite Day' ... :)

onebuck 12-17-2010 02:56 PM

Hi,

Quote:

Originally Posted by poonamkhirolia (Post 4194817)
Write a program in any language you choose, to reverse a file.

You are not helping yourself by repeated homework style posts. Warning!

poonamkhirolia 12-25-2010 03:40 AM

Quote:

Originally Posted by druuna (Post 4194848)
Hi,

If by reverse you mean last line first, first line last: Try tac (Yep, that is cat in reverse).

Hope this helps.

EDIT:
Mmmmm..... catkin seems to have a good point......
/EDIT

Thanks it's working!!!!!

poonamkhirolia 12-25-2010 03:43 AM

Quote:

Originally Posted by onebuck (Post 4195117)
Hi,



You are not helping yourself by repeated homework style posts. Warning!

Thanks those links are of great help!!!!

onebuck 12-25-2010 02:33 PM

Hi,

I'm glad to be of help!
:hattip:


All times are GMT -5. The time now is 05:34 AM.