OS4 DepotLogo by Nickman 
(anonymous IP: 54.224.18.114,1134) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 
 Categories

   o Audio (328)
   o Datatype (47)
   o Demo (180)
   o Development (528)
   o Document (21)
   o Driver (87)
   o Emulation (141)
   o Game (852)
   o Graphics (456)
   o Library (88)
   o Network (200)
   o Office (56)
   o Utility (804)
   o Video (60)

Total files: 3848

Full index file. Download
Recent index file. Download




 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Utility » Shell » gsar.lha

gsar

Description: General Search And Replace
Download: gsar.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 109kb
Version: 1.21
Date: 31 Mar 17
Author: emufan-eab (at) yandex.com
Submitter: Samir Hawamdeh
Requirements: AmigaOS4
Category: utility/shell
License: Other
Distribute: yes
Min OS Version: 4.0
FileID: 10186
 
Comments: 0
Snapshots: 0
Downloads: 62  (Current version)
62  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show comments Show snapshots Show content Show crashlogs Replace file 
Description:

gsar (General Search And Replace) is a utility for searching for and
--- optionally --- replacing strings in both text and binary files.
The search and replace strings can contain all kinds of characters
(0--255), i.e. Ctrl characters and extended ASCII as well. 

The algorithm used is a variation of the Boyer-Moore search algorithm,
modified to search binary files. As a result of this, gsar is blindingly
fast. 

Opposed to line oriented search programs (like grep(1)), gsar will find
all matches on a line. Actually, gsar doesn't know anything about lines
at all, all files and strings are treated as binary. 

Gsar can search one or several files for a string and report the
occurrences. Gsar can read one file, search for a string, replace
it with some other string, and create a new file containing the changes.
Gsar can perform a search and replace in multiple files, overwriting the
originals. Finally, gsar can work as a filter, reading from standard
input and writing to standard output.

Example:

- replace string FORM with TEST in file image.iff
gsar -o -sFORM -rTEST image.iff

- display search and replace strings only
gsar -B -sFORM -rTEST image.iff

- display ascii search result only
gsar -sFORM -c16 image.iff

- display hex search result only
gsar -sFORM -x16 image.iff

Installation:

- CPU 68000  --> copy m68k-amigaos/gsar000 to c:gsar
- CPU 68020+ --> copy m68k-amigaos/gsar020 to c:gsar
- CPU OS4 PPC  --> copy ppc-amigaos4/gsar to c:gsar

Project Home Page:
- http://gnuwin32.sourceforge.net/packages/gsar.htm

Original Source:
- https://web.archive.org/web/*/http://home.online.no/~tjaberg/gsar121.zip

Build using cross compiler toolchain:
- https://github.com/cahirwpz/amigaos-cross-toolchain

m68k-amigaos-gcc -m68000 -mcrt=clib2 -fomit-frame-pointer -lgcc -o gsar000 *.c
m68k-amigaos-gcc -m68020 -mcrt=clib2 -fomit-frame-pointer -lgcc -o gsar020 *.c

Disclaimer:

- Use at your own risk. No warranty expressed or implied, etc.

Legal Notice:

- All product names, logos and brands are property of their respective owners.

- Product and service names used in this release are for identification
  purposes only. All trademarks and registered trademarks are the property of
  their respective owners.

Copyright (c) 2004-2017 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment