News for hackers. Stuff that matters.

ojjzhna

Re:How and Why to Log Your Bash History on Thursday June 02, 2016 @10:08AM (#11822542)
I have bash script in my bash_profile to support separate history files named with tty, month and year (so separate files for each tty). It looks for recent history files for the given tty and reloads old history on first startup.

Have cron job to signal bash session to flush history with command timestamps/dates to disk daily.

Handy for recalling commands/command switches you ran months ago.

Crude, but what I use: text file with each note a paragraph. Each paragraph get's an integer weight. A filter repeats a given note (paragraph) as the integer indicates. Every twenty minutes 3 random notes are echoed to one of my GNU screen terminals. I go to that 'screen' window when I'm bored. This is somewhat like UNIX 'fortune'. The weights are arbitary, quite a few '1's, and some urgent ones as high as 1500 - some for learning, some for nagging.
Re:Ask HN: What open source project is your pride and joy? on Tuesday November 05, 2013 @02:10PM (#6677337)
"locally grown" GPL'd scripts (general utils); most bash, some perl; bash function library

Want to share these simple, general utilities, handy tools, or convenience wrappers - most bash, some perl. Categories: script-infrastructure libraries, text filtering, log creation/parsing, simple network-related, regex, time, mail, cygwin, latex, jobs, processes, pathname, file or file-archive related, m4, make, system, and backup:

Been writing shell scripts since late 80s, still humble, and learning; appreciate constructive code review.

http://TRodman.com/scripts (~400k tarball w/installer)

--

Tom

Linux/devops scripting admin for HIRE; resume/skill assessment: http://TRodman.com