Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Reverse a file, really
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 498

PostPosted: Wed Jan 16, 2013 7:25 am    Post subject: Reverse a file, really Reply with quote

Hi,

Iam trying to reverse a file.... "tac" only does this line by line.

Code:
This
is
cool


with tac I get
Code:
cool
is
This


But I need to get
Code:

looc
si
sihT


Any Ideas? (I could make a loop and use dd but maybe theres a tool already existing)
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Wed Jan 16, 2013 7:27 am    Post subject: Reply with quote

Code:
tac < in | rev

_________________
Your argument is invalid.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 498

PostPosted: Wed Jan 16, 2013 7:43 am    Post subject: Reply with quote

Hi thanks for the answer

rev: stdin: Invalid or incomplete multibyte or wide character

I guess I forgot to mention. Iam trying to reverse a bitmap file :-))
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Wed Jan 16, 2013 7:59 am    Post subject: Reply with quote

Yeah, you forgot to mention that. Say what you're actually doing.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
sikpuppy
n00b
n00b


Joined: 12 Jun 2012
Posts: 34
Location: Central Coast, NSW

PostPosted: Wed Jan 16, 2013 12:50 pm    Post subject: Reply with quote

http://roundcubeinbox.wordpress.com/2009/09/11/mirror-images-with-imagemagick/
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Wed Jan 16, 2013 3:30 pm    Post subject: Reply with quote

I thought of imagemagick too but I'll be surprised if that's what he needs. I think he wrote bitmap but meant binary.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
sikpuppy
n00b
n00b


Joined: 12 Jun 2012
Posts: 34
Location: Central Coast, NSW

PostPosted: Thu Jan 17, 2013 2:33 am    Post subject: Reply with quote

I've always wondered how helpdesk workers turn evil. The answer to that is starting to dawn on me.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1565
Location: U.S.A.

PostPosted: Thu Jan 17, 2013 4:12 am    Post subject: Reply with quote

Source code is in link at bottom:
http://www.efg2.com/Lab/ImageProcessing/FlipReverseRotate.htm
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum