Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
BASH history... for years
Results 1 to 10 of 10

Thread: BASH history... for years

  1. #1

    BASH history... for years

    Hello everybody,

    This is the first my visit to the forum and it seems I might hang out here from time to time. So I decided to share my small trick. You can find all details on Bash History Page on my website. But here is the intro so you decide if you need it



    You're using bash? You probably love it, especially if you use bash_completion script... Ok - no more lyrics. I like to keep track of what and when I'm doing something in shell. It is reasonable wish to have all my activites logged so in future I can check what I've done if I need to find where I made a mistake or how I've done something.

    So first solution would be to set HISTSIZE to be very big, but then I don't know how well your bash would behave - I believe it tries to keep them all in memory. But I want to have my bash fast! So it must be accomplished in another way.

    Lets use a big file ~/.bash_history.archive (separate from HISTFILE=~/.bash_history). And then on exit from each bash session lets append new history lines to it. The problem with this approach is how to make bash call this script on each exit? Sure if you exit it by typing 'exit' then you can alias 'exit' function but I use shortcut Ctrl-D for that and I could not find a way how to reassign it to something not builtin exit function.
    I hope it comes useful. Any comments are welcome!

  2. #2
    Senior Member
    Join Date
    Apr 2004
    Location
    Atlanta GA
    Posts
    373
    Hi, welcome to the Foo

  3. #3
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Hello and welcome.

    Thanks for posting a link to your site with that tutorial on it. I love bash, and even though I don't think I will be implimenting the history feature you talk about. I like finding out all the think you can do with bash.
    jro -
    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

    Linux counter#:213782
    GnuPG ID: 406238E7

  4. #4
    Quote Originally Posted by jro";p="4736
    I love bash, and even though I don't think I will be implimenting the history feature you talk about.
    Thank you guys for welcoming me

    As for this feature: it helps me a lot mostly because I use bash to compose quick scripts/pipes to process some data doing "research", and often I don't keep a separate protocol. Keeping log of all my actions I can always come back (nomater when I was doing that) to what I was doing at that moment, and how.

    For the same purpose I made mandatory diaring of all my actions in matlab (description is also on my webpage :-))

  5. #5
    Member
    Join Date
    Apr 2004
    Location
    Colorado, USA
    Posts
    139
    I'm late wishing you welcome. I did pull the bash information and will be implementing it shortly. Thanks.
    Everything I learn gives me another way to say \"OOPS!\" :oops:

  6. #6
    Guest
    Dood.

    Way to break it out!

  7. #7
    Mentor
    Join Date
    May 2004
    Location
    Louisiana
    Posts
    1,206
    Hey, I screwed-up! Then I red this article and unscrewed-up. Duh?

    yarikoptic, crawl in more often, need lots of help.
    Thanx for your post.

  8. #8

    Re: BASH history... for years

    I'm glad that you liked it guys I need to improve it a bit occasionally but it kinda works so I don't touch it for now ;-) (although need to update online version with a tiny bugix)

    As for linux humor:
    We need to discuss a topic "how to make linuxfoo faster" because today it just drives me nuts by its speed - it is soooo sloooooww

    BTW whoever is from NJ - we are organizing a LUG at NJIT so you are welcome :-) lug.njit.edu
    hopefully we will have busy forum some day so you're welcome to join :-)

  9. #9
    Associate
    Join Date
    Feb 2005
    Location
    Upstate NY
    Posts
    16

    Re: BASH history... for years

    Welcome, yarikoptic. I would agree that a faster Linuxfoo would be a good thing.

  10. #10
    Member
    Join Date
    Apr 2004
    Location
    Colorado, USA
    Posts
    139

    Re: BASH history... for years

    Just a thought but I think someone should start a users group by the name of: "LUGNUTZ" :lol:
    Everything I learn gives me another way to say \"OOPS!\" :oops:

Similar Threads

  1. History is okay.
    By Fatal Error in forum General Chat
    Replies: 0
    Last Post: 02-17-2005, 12:04 AM
  2. Epiphany URL history
    By trickster in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 03-24-2004, 12:45 AM
  3. Replies: 2
    Last Post: 12-14-2003, 06:49 PM
  4. Carl and Brak to Host New Years Eve Bash
    By Ashcrow in forum General Chat
    Replies: 9
    Last Post: 01-02-2003, 03:21 AM
  5. Replies: 5
    Last Post: 03-30-2002, 07:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •