Cynosure.X International

: :

Add Comment | Related Links | TrackBack
Related Content

Reverse.bash (GPL)

Reverse.bash is a Bash shell script that reverses the order of your text file. Simply pass the input and output file paths as argument and it will do the trick. Output file must not already exist or the software warns you and exits.

Reverse.bash is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.

Usage

  Reverse.bash "infile" "outfile"

Attached File: Reverse.bash (595 B)

Chieh Cheng
Fri, 02 Feb 2007 19:28:23 -0800

Found a bug in Reverse.bash where it wouldn't work with lines that contain spaces. The new version attached below fixes that problem.

Attached File: 1 - Reverse.bash (810 B)

Chieh Cheng
Thu, 05 Feb 2009 23:48:27 +0000

I've made a huge improvement in this version of Reverse.bash by using the "tac" utility to perform the reverse operation. The improved version of Reverse.bash is attached below.

However, some systems (such as Mac OS X) does not have the "tac" utility. In those cases, the previous version of Reverse.bash, with its own reverse algorithm, is still better. In the future, I may modify Reverse.bash to support both methods.

Attached File: 2 - Reverse.bash (441 B)

Chieh Cheng
Fri, 20 Nov 2009 01:56:42 +0000

Noticed that the script is calling "sh" rather than BASH. So I made a minor change to call the right shell interpreter.

Attached File: 3 - Reverse.bash (452 B)

Chieh Cheng
Fri, 14 Aug 2015 12:25:22 +0400

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

TrackBack

Send Ping | TrackBack URL | Spam Control

Title: womens air max 95
Weblog: womens air max 95
Excerpt: Sanchez also has a prior relationship with Rams offensive coordinator Brian Schottenheimer.
Tracked: Sat, 25 Mar 2017 22:01:57 -0700

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 10 - 0?
Click button only once, please!

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

11 Users Online

Hacking Digital Cameras
Fun for Photographers


Amazon Associate

Copyright © 1996 - 2017. All Rights Reserved.