2007/08/06

uniread - the best oracle command mate

uniread adds readline (line editing, command history, etc.) support to any
existing interactive command-line program. You can use this to add support
to annoying programs which do not provide it built-in (a good example is
Oracle's sqlplus, or jython) or to easily add it to your own programs.

To build this distribution, run:

perl Makefile.PL
make
make install


uniread requires:

- GNU readline
http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
- Term::ReadLine::Gnu
http://search.cpan.org/dist/Term-ReadLine-Gnu/
- IO::Tty
http://search.cpan.org/dist/IO-Tty/
or http://sourceforge.net/projects/expectperl


The latter two can be installed using the CPAN shell. Run:

perl -MCPAN -e shell

install Term::ReadLine::Gnu
install IO::Tty


-----
By me:
Add a command to .bash_profile/profile will help common user to uniread


# proxy
export http_proxy=http://proxy:8080/
export ftp_proxy=http://proxy:8080/

# initialize CPAN, just press enter except download site
perl -MCPAN -e shell

# install the pre-required modules, force for 86-64
perl -MCPAN -e shell << __EOF__
force install Term::ReadLine::Gnu
install IO::Tty
__EOF__

# copy and install uniread package
cd ~
[ ! -d pkg ] && mkdir pkg
pushd pkg
cp -a ~oracle/work/fyang/ofpkg/uniread*.tar.gz .
tar -zxvf uniread*.tar.gz
cd uniread*
perl Makefile.PL
make install
popd

# profile
cat >> /etc/profile << __EOF__
alias ufsqlplus="echo enter popd to return to original dir. ; pushd ~oracle/work/fyang ; uniread --quiet sqlplus "
alias sqlplusuf="echo enter popd to return to original dir. ; pushd ~oracle/work/fyang ; uniread --quiet sqlplus "
alias usqlplus="uniread --quiet sqlplus "
alias sqlplusu="uniread --quiet sqlplus "
__EOF__

No comments: