#!/bin/bash ## hashline, a terminal utility for writing lines full of hash marks. ## Useful for demarcating between lines of output of multiple commands. ## Usage: hashline [n] (Default: n=1) ## Writes n lines of hash marks to console. if [ $1 -gt 0 ] 2>/dev/null ## Bit bucket errors from empty or noninteger arguements. then export c=$1 ## Accept integer arguments greater than 0. else export c=1 ## Otherwise loop count needs to be at least 1. fi for ((c; c>0; c-- )) ## For each on 'n' counts: do let COLS=$(( $(tput cols) )) ## Evaluate number of columns in display. for (($COLS; COLS>0; --COLS)) ## For each column in display: do echo -n "#" ## Write on '#' on current line. done echo ## Move cursor down one line at end of loop. done