WordPress/Linux Bash CLI Notes Engine Facility

I created this process to improve my record keeping while working on a Linux bash shell. It allows for one to take notes while on the command line as well as publish to WordPress for tidy and organized record keeping.


  • Posts logs to WordPress from any Linux hosts.
  • Log all CLI commands to syslog globally.
  • Record literal notes to syslog.
  • Privately post logs to WordPress via CLI.
  • Posting of Subject from CLI to WP posts.
  • Auto insert [hostname] into WordPress post subject.
  • Auto remove undesired data from WP posts.
  • Auto insert [shortcode] into WordPress posts.


  • Auto redact sensitive data on CLI WP post actions.
  • Record file changes to syslog (fork tripwire).
  • Post Categories to WordPress posts from CLI.
  • Post Tags to WordPress posts from CLI.


  • A self-hosted WordPress Installation.
  • The free Twenty Fifteen Theme.
  • FOSS Postie Plugin by Wayne Allen.
  • FOSS SyntaxHilighter Evolved by Alex Mills.
  • A pop3 mailbox (Postie to pull & DELETE emails).
  • Logger via the util-linux package.
  • Mailx via the mail-utils package.
  • Rsyslog via rsyslog package.
  • A bit of troysio microcode.


  • Install WordPress.
  • Activate Twenty Fifteen Theme.
  • Download/Activate SyntaxHilighter Evolved in plugins.
  • Download/Activate Postie within plugins area.
  • Configure Postie to fetch and posts PRIVATELY text only.
  • Install mail-utils and util-linux packages on all Linux hosts.
  • Create your CLI logging syslog service.
  • Drop the following troysio microcode into e.g. /usr/local/bin/yourio and make it executable.
  • #!/bin/sh
    # Troy Perkins
    # https://troys.io
    # Note: Make sure to remove all "\"es from Shortcode lines before executing. I had to place them in order for this code to be published here due to surrounding bash shortcode in this post.
    #Pop3 mailbox;
    { echo $shrtstart; cat $file | cut -d':' --complement -s -f1,2,3,4 | sed 's/\ [^\ ]*$//'; echo $shrtend; } | uniq | mailx -s "[$host] $1" $mailb

To take manual notes type a # sign then your note then hit enter:

root@crm:# # Here is an example of a manual note on the command line.

To send notes to WordPress:

root@crm:# troysio "Here is my subject"

Example Output:

vi /usr/bin/troysio
vi /usr/bin/troysio-redact
troysio "testing new cut"
cat /var/log/commands.log | cut -d':' --complement -s -f1,2,3,4
vi /usr/bin/troysio
vi /usr/bin/troysio-redact
troysio "testing new cut"
troysio uniq
vi /usr/bin/troysio
troysio uniq
troysio | uniq
vi /usr/bin/troysio
vi /usr/bin/troysio-redact
troysio "testing uniq"
vi /usr/bin/troysio
troysio "testing uniq"
cat -A /var/log/commands.log
cp /usr/bin/troysio /usr/bin/troysio-test
vi /usr/bin/troysio-test
troysio-test | cat -A
troysio-test | sub(/\r$/,"") | cat -A
troysio-test | cat -A
# Here is an example of a manual note on the command line.
# Hope you enjoy your note taking helper.
# Cheers.
troysio "here is my subject"
# WordPress post made with above command with title [crm] < host and "here is my subject" on the title of post.
# Joy

To view the actual post, which I’ve changed from Private to Public just for you go here: https://troys.io/crm-here-is-my-subject/


One response to “WordPress/Linux Bash CLI Notes Engine Facility”

  1. […] WordPress/Linux CLI Notes Engine […]

Leave a Reply

Your email address will not be published. Required fields are marked *