On Thursday 06 November 2003 17:41, Brian Baquiran wrote:
> According to bash(1):
>
> HISTORY
> When  interactive,  the  shell  provides access to the command history, the
> list of commands previously typed.
>
> Your script is not interactive, hence no history is available.

however, "history -n" is a workaround.  if you first do a history -n
in the script, then history will return the contents of the $HISTFILE.
however, it does *not* remember shell commands done inside
the script.  but if all he needs to do is do some text processing on
the history then it's possible.  i don't see much profit in it myself :).
but it's possible.

tiger

-- 
Gerald Timothy Quimpo  gquimpo*hotmail.com tiger*sni*ph
http://bopolissimus.sni.ph
Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78"

    The perversity of the universe tends toward a maximum.
                            Finagle's law.
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to