catgrep

#!/bin/bash ################################################################################ # 24 jun 2016 - john meister copyright 2016 http://johnmeister.com/linux # cat's file, then greps out blank lines and comments, offers option to save ################################################################################ USAGE="catgrep filename # removed commented and blank lines, option to save" echo ' --------------------------------------------------------------------' echo " DISPLAYING: --> $1 <-- without commented or blank lines" echo ' --------------------------------------------------------------------' cat $1 | grep -E -v '(^#|^$)' echo "save info? Y,y" echo '-----------------------------------------------------------------' read answer ; if [ $answer = "y" ] then echo "$1" | tee $1-content-`date +%Y%b%d-%H%M`.txt cat $1 | grep -E -v '(^#|^$)' | tee -a $1-content-`date +%Y%b%d-%H%M`.txt echo '-----------------------------------------------------------------' echo " info written to: $1-content-`date +%Y%b%d-%H%M`.txt " echo '-----------------------------------------------------------------' else echo ' ### ------------------------------------' echo ' ### info not written.' echo ' ### ------------------------------------' fi


search for:
on the internet, or:
JohnMeister.com-fotos
LinuxMeister-Linux
BibleTech-
Bible overview


Wagoneers

FULL SIZE JEEPS

JeepMeister
"Jeep is America's
only real sports car."
-Enzo Ferrari


MeisterTech
Diesels +

One Page Overview

Intro to Linux
FREE!

FREE!
AMSOIL product guide,
or, AMSOIL web, or 1-800-956-5695,
use customer #283461

Amsoil dealer since 1983
purchase AMSOIL
at Midway Auto on SR9 in Snohomish,
or at Northland Diesel in Bellingham, WA


SJ - 1962-1991

XJ - 1984-2001

WJ - 1999-2004

KJ - 2002-2007

WK - 2005-2010

Find the recommended
AMSOIL synthetics
for your Jeep

CJ-10A - 1984-1986

Jeepsters

MJ - 1984-1992

Willys - 1946-1965

Other Jeeps (FC)