<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oraklet &#187; Linux</title>
	<atom:link href="http://www.oraklet.no/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oraklet.no</link>
	<description>Systemutvikling, drift, opplæring og rådgivning innen Oracle, Linux og Unix</description>
	<lastBuildDate>Fri, 30 Sep 2011 08:43:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Forenkle arbeidsdagen med rlwrap</title>
		<link>http://www.oraklet.no/2009/02/rlwrap/</link>
		<comments>http://www.oraklet.no/2009/02/rlwrap/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 19:53:29 +0000</pubDate>
		<dc:creator>Ingemar Jansson Haverstad</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.oraklet.no/?p=55</guid>
		<description><![CDATA[One of my favorite program is <em>rlwrap</em>. I usually wrap this program around all command based programs where I would like to use the arrows keys for easy editing. <a href="http://www.oraklet.no/2009/02/rlwrap/">Les videre <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Et av mine favorittprogram er <em>rlwrap</em>. Det programmet &laquo;pakker&raquo; jeg inn i andre programmer hvor jeg ønsker at pil-tastene skal anvendes for enkel redigering av teksten.</p>
<p>Hvis du arbeider på Ubuntu Linux finnes pakken ferdig kompilert, da er det bare å laste ned programmet:</p>
<pre> <code>
oracle@ubuntu: ~ $ <strong>sudo apt-get install rlwrap</strong>
...
</code></pre>
<p><span id="more-55"></span><br />
For de fleste andre Linux og Unix varianter må du først søke på Google etter <em>rlwrap</em> og laste ned kildekoden.</p>
<pre> <code>
[oracle@linux tmp]$ <strong>tar xvzf rlwrap-0.30.tar.gz</strong>
rlwrap-0.30/
rlwrap-0.30/completions/
rlwrap-0.30/completions/ftp
...

[oracle@linux tmp]$ <strong>cd rlwrap-0.30</strong>
/tmp/rlwrap-0.30

[oracle@linux rlwrap-0.30]$ <strong>./configure</strong>
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk

...

config.status: creating distribution/rlwrap.spec
config.status: creating config.h
config.status: executing depfiles commands

Now do:
make (or gmake)  to build rlwrap
make check       for instructions how to test it
make install     to install it

[oracle@linux rlwrap-0.30]$ <strong>make</strong>
make  all-recursive
make[1]: Entering directory `/tmp/rlwrap-0.30'
Making all in doc
/tmp/rlwrap-0.30/doc
make[2]: Entering directory `/tmp/rlwrap-0.30/doc'
sed -e 's#@DATADIR@#/usr/local/share#'  rlwrap.man &gt; rlwrap.1
make[2]: Leaving directory `/tmp/rlwrap-0.30/doc'
Making all in src

[oracle@linux rlwrap-0.30]$ <strong>sudo make install</strong>
Password: <strong>######</strong>
Making install in doc
/tmp/rlwrap-0.30/doc
make[1]: Entering directory `/tmp/rlwrap-0.30/doc'
make[2]: Entering directory `/tmp/rlwrap-0.30/doc'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/share/man/man1" || /bin/mkdir -p "/usr/local/share/man/man1"
/usr/bin/install -c -m 644 './rlwrap.1' '/usr/local/share/man/man1/rlwrap.1'
make[2]: Leaving directory `/tmp/rlwrap-0.30/doc'
make[1]: Leaving directory `/tmp/rlwrap-0.30/doc'
Making install in src
/tmp/rlwrap-0.30/src
make[1]: Entering directory `/tmp/rlwrap-0.30/src'
make[2]: Entering directory `/tmp/rlwrap-0.30/src'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/usr/bin/install -c 'rlwrap' '/usr/local/bin/rlwrap'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/tmp/rlwrap-0.30/src'
make[1]: Leaving directory `/tmp/rlwrap-0.30/src'
make[1]: Entering directory `/tmp/rlwrap-0.30'
make[2]: Entering directory `/tmp/rlwrap-0.30'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/share/rlwrap" || /bin/mkdir -p "/usr/local/share/rlwrap"
/usr/bin/install -c -m 644 'completions/ftp' '/usr/local/share/rlwrap/ftp'
/usr/bin/install -c -m 644 'completions/testclient' '/usr/local/share/rlwrap/testclient'
/usr/bin/install -c -m 644 'completions/coqtop' '/usr/local/share/rlwrap/coqtop'
make[2]: Leaving directory `/tmp/rlwrap-0.30'
make[1]: Leaving directory `/tmp/rlwrap-0.30'

[oracle@linux rlwrap-0.30]$ <strong>which rlwrap</strong>
/usr/local/bin/rlwrap
</code></pre>
<p>Muligens må du laste ned fler biblioteker for å få <em>rlwrap</em> til å kompilere.</p>
<pre> <code>
[oracle@linux tmp]$ <strong>tar xvzf readline-5.2.tar.gz</strong>
readline-5.2/
readline-5.2/doc/
readline-5.2/doc/Makefile.in

...

[oracle@linux readline-5.2]$ <strong>cd readline-5.2</strong>
/tmp/readline-5.2

[oracle@linux readline-5.2]$  <strong>./configure</strong>
[oracle@linux readline-5.2]$ <strong>make</strong>
[oracle@linux readline-5.2]$ <strong>sudo make install</strong>
[oracle@linux readline-5.2]$ <strong>sudo ldconfig</strong>
</code></pre>
<p>Legg inn noen alias i for eksempel <strong>.bashrc</strong> så er <em>rlwrap</em> inkludert i de programmene du bruker hver dag.</p>
<pre> <code>
ingemar@linux: ~ $ <strong>cd</strong>

ingemar@linux: ~ $ <strong>vi .bashrc</strong>

alias sql='sqlplus "/ as sysdba"'
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias dgmgrl='rlwrap dgmgrl'

alias boston='. ~/.boston'
alias chicago='. ~/.chicago'
alias emrep='. ~/.emrep'

alias test10g='. ~/.test10g'
alias test11g='. ~/.test11g'

alias ll='ls -ltr'
</code></pre>
<p>Da er det bare å teste hvordan dine program fungerer.</p>
<p>Lykke til!<em></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oraklet.no/2009/02/rlwrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

