Add Comment
|
Related Links
|
TrackBack
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. UsageReverse.bash "infile" "outfile" Attached File: Reverse.bash (595 B) Chieh Cheng Found a bug in Reverse.bash where it wouldn't work with lines that contain spaces. The new version attached below fixes that problem. Chieh Cheng 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. Chieh Cheng Noticed that the script is calling "sh" rather than BASH. So I made a minor change to call the right shell interpreter. Chieh Cheng
Add Comment
|
Related Links
|
TrackBack
Did your message disappear? Read the Forums FAQ. Add CommentSpam Control | * indicates required field TrackBackTrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites. Send Ping | TrackBack URL | Spam Control No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here. Messages, files, and images copyright by respective owners. |
Products
|
Services
52 Users Online
|
Copyright © 1996 - 2024. All Rights Reserved. |