Menu

Home

fciri

Welcome to isar wiki

isar (Interactive Search And Replace) is a tool to search and replace text in interactive mode via linux shell.
isar support recursive search in directory, regex and colorized output.
It's written in C++ using boost library.

You can use
1. precompiled binary file or
2. compile program yourself

1. USE PRECOMPILED BINARY FILE


If you have a Linux running on x86_64 you can download precompiled version from

http://sourceforge.net/projects/isartool/files/isar_static_x86_64/download

This is precompiled version for processor x86 at 64 bit.

For use precompiled version, download the file and just copy in directory included in your PATH as /usr/bin or /usr/local/bin.

2. COMPILE THE PROGRAM


2.1. Ckeck prerequisite

For compile the tool, you must have installed:
- gcc
- glib
- make

Check the presence of these programs and install in case of missing using package manager of your distribution.

2.2. Download isar souce code

Download isar souce code from https://sourceforge.net/p/isartool/code/ci/master/tree/ clicking on button "Download snapshot".
Extract the file, for example in /tmp/isartool-code directory:

unzip -d /tmp/ isartool-code.zip

2.3 Check boost libs

Most Linux distro, contains a boost libs already installed.
You can check the presence of boost libs with these commands:

ldconfig -p | grep libboost_filesystem
ldconfig -p | grep libboost_regex

If last command locate libs, you can skip step 2.3.1 othewise you must prepare boost libs.

2.3.1 Prepare boost libs

Download the boost libs from http://sourceforge.net/projects/boost/files/latest/download
Extract the file, for example running in folder /tmp/boost_1_54

tar -C /tmp/ -xvjf boost_1_54.tar.bz2

Build bjam tool

For make bjam tool (a metacompiler for compiling boost libs), enter to /tmp/boost_1_54 and run:

cd /tmp/boost_1_54/
./bootstrap.sh

An executable called b2 must be appear in the /tmp/boost_1_54/ directory

Compile boost libs

You can generate the boost libs as shared libs or static libs

Generate shared libs:

./b2 libs/regex/build
./b2 libs/filesystem/build
./b2 libs/system/build

Generate static libs:

./b2 link=static libs/regex/build
./b2 link=static libs/filesystem/build
./b2 link=static libs/system/build

Copy libs and header

First, create the destination folder for libs and header:

mkdir /tmp/isartool-code/lib
mkdir /tmp/isartool-code/lib/include

After you can copy libs and header.

Copy libs:
You can found libs inner following folder:

  • /tmp/boost_1_54/bin.v2/libs/regex/build/(NAME_OF_YOUR_COMPILER)
  • /tmp/boost_1_54/bin.v2/libs/system/build/(NAME_OF_YOUR_COMPILER)
  • /tmp/boost_1_54/bin.v2/libs/filesystem/build/(NAME_OF_YOUR_COMPILER)

If you have generated shared libs:
Copy in /tmp/isartool-code/lib the following libs:

  • libboost_regex.so.1.54.0
  • libboost_system.so.1.54.0
  • libboost_filesystem.so.1.54.0

If you have generated static libs:
Copy in /tmp/isartool-code/lib the following libs:

  • libboost_regex.a
  • libboost_system.a
  • libboost_filesystem.a

Copy header:

cp -R /tmp/boost_1_54/boost /tmp/isartool-code/lib/include

2.4 Compile isar

For compile isar using shared libs, enter in /tmp/boost_1_54/

cd /tmp/boost_1_54/

and run:

make -f makefile.lin.dynamic

For compile isar using static libs, enter in /tmp/boost_1_54/

cd /tmp/boost_1_54/

and run:

make -f makefile.lin.static

3. RUN ISAR


Enter in /tmp/boost_1_54/ folder

cd /tmp/boost_1_54/

For show the help, run

bin/isar

For launching isar in everyplace of filesystem, copy isar in /usr/bin folder:

cp /tmp/boost_1_54/bin/isar /usr/bin