NOTE:  need to write file to user's home directory
       place in user's bin directory, chmod 755  or execute as:   sh ./catgrep filename

#!/bin/bash
################################################################################
# jm - 24 jun 2016 - cat, grep out blank lines and comments, option to save
################################################################################
USAGE="catgrep filename # removed commented and blank lines, option to save"
echo "$1"
cat $1 | grep -E -v '(^#|^$)'
echo "save info? Y,y"
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
        else
        echo 'thanx for using catgrep! next'
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)