sixarm_unix_shell_scripts

Created: 2010-05-21 03:02
Updated: 2019-02-20 20:01

README.md

Unix ยป shell scripts for sh, bash, tcsh, zsh, etc.

This repo has lots of Unix shell scripts that are utilities.

Command line boosters

awk

sed

directory

file

File scripts to print a given ls field:

find

date

  • date-stamp: Print the current date stamp UTC in a user-friendly format.
  • date-stamp-shortest: Print the current date stamp UTC in the shortest format.

history

grep

  • grep-medium-words: Grep for typical words, length 4-7 characters, all lowercase, a-z.
  • grep-v-web-bots: grep without web robot strings like robots.txt, Googlebot, Mouseflow, etc.
  • grep-v-web-chaff: grep without web chaff like lines that have .css, .js, .png.

lsof

dig

gpg

  • gpg-decrypt: GPG script to decrypt a file with our typical settings.
  • gpg-encrypt: GPG script to encrypt a file with our typical settings.

uri & url

  • uri-escape: URI script to escape text, for example a CGI query string.
  • uri-unescape: URI script to unescape text, for example a CGI query string.
  • uri-scheme: Parse a URI to its fields, for example host, query, fragment.
  • uri-relate: Combine a base URI and relative URI to an absolute URI.

path

  • addpath: Add path(s) to the PATH environment variable
  • rmpath: Remove path(s) from the PATH environment variable.

wc

random passwords

processes

copying

  • cp-progress: Copy files using a command-line progress bar.

networking

scripting

  • cddo: Run a command in each directory.
  • command-is-installed: If a given command installed, then return true.
  • keep: Keep running a command every time any file it looks at is changed.
  • no: Shorthand to always return "n"
  • while-read-do-cd: For each line of input on command line, cd into a path then run a command.

compression

  • extract: Extract a file using best-guess of tar, bzip, rar, gz, zip, etc.
  • tar-bzip2: Run tar using bzip2 compression.

text

  • between: between: print the lines of a file that are between match $1 and match $2.
  • camelize: Convert text to camel-case like FooGooHoo.
  • diff-sort: Shorthand to diff with sort.
  • file-encode-utf-8: Convert encoding of a file to unix utf-8.
  • file-line-num: Print a file's line at a given line number.
  • json-to-xml: json-to-xml is a pipe command to convert
  • h1-links: Convert the first <h1> link in a stream to an HTML list item.
  • summary-line: Summarize a text file in one line.

text replacement

text sets

  • union: set "union" of the inputs' lines.
  • intersect: set "intersect" of the inputs' lines.
  • except: set "except" of the inputs' lines a.k.a. set (A - B).
  • extra: set "extra" of the inputs' lines, a.k.a. set (B - A).

media

fonts

sysadmin

  • ls-tree: List files in your current directory recursively shown as a tree.
  • mkcd: Make a directory with 'mkdir' then change into it with 'cd'.
  • os-version-info: Show operating system version information.
  • reboot-kernel: Quickly (soft-)reboot skipping hardware checks.
  • screenrc: Keybindings.
  • sort-rank: Sort command-line input by rank.
  • susu: Shorthand for: sudo su -

bash

OS X

Specific needs

Applications

  • gimp-2.7.1: Launch GIMP 2.7.1 from our /opt directory with our library path settings.
  • gmail: Check your unread gmail from the command line.
  • gravatar: Gravatar: generate a gravatar URI for a given email address.
  • spam: Move spam email messages out of my inbox folder and into my spam folder.

Images

  • convert-ico-to-png: Convert an ICO image file to a PNG image file.
  • [glue-sprites: Use the glue](glue-sprites: Use the glue) command to compress a directory of images to sprites.

Favicon

Location

Ubuntu

FTP, ProFTPD, and xferlog

SixArm Setup

Ruby

Ruby administration

  • ruby-remove: This script will remove all ruby-related files that we know about. DANGEROUS!
  • ruby-versioner: Set the Ruby environment to be a particular version of Ruby.

Ruby gem

  • gem-paths: Prints your gem paths by calling "gem env" then matching
  • gem-test: Gem script to run all the test files.
  • gem-update: Run gem update, install, tumble, and set up our typical gem sources.
  • gem-fixer: Advises if any gems need fixing or updates. [Deprecated]

Ruby managers

Ruby testing and documentating

Rails

Amazon Web Services

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more