findKN-verses.sh - a text searching tool...

--> more findKN-verses.sh 
#!/bin/bash
# findKN-verses.s   23 Apr 2017 jm
# finds text in KJV and NASB - prints results and verses in local directory
##########################################
for x in $1
    do 
    FILE="_$x-REFERENCES.txt"
    echo "======================"  > $FILE
    echo "searched for: $x on `date +'%Y %M %d at %H:%M'`" >> $FILE
    echo "======================"  >> $FILE
     echo "----------" >> $FILE
     echo "$x found in KJV and NAS translations:`grep -i $x ~/bin/KNb.txt | wc -l` times"  >> $FILE
     echo "-- $x found in kjv `grep -i $x ~/bin/KNb.txt | grep '(kjv)' | wc -l` times ---" >> $FILE
     echo "-- $x found in NAS `grep -i $x ~/bin/KNb.txt | grep '(nas)' | wc -l` times ---" >> $FILE
     echo "----------" >> $FILE
     echo "-- $x was found in the KJV in:" >> $FILE
     grep -i $x ~/bin/KNb.txt | grep "(kjv)" | awk '{print $1" "$2}' > $FILE-2
     perl -pi -e 's/\n/; /g' $FILE-2  
     cat $FILE-2 >> $FILE
     echo "--- KJV: $x ---" >> $FILE
     echo "----------" >> $FILE
###################################################
     echo "----- $x was found in the NASB in:" >> $FILE
     grep -i $x ~/bin/KNb.txt | grep "(nas)" | awk '{print $1" "$2}' > $FILE-2
    #  alternate could be to use:   cut -c 1-10   (estimating the space used for the references)
     perl -pi -e 's/\n/; /g' $FILE-2 
     cat $FILE-2 >> $FILE
     rm -f $FILE-2
     echo "--- NASB: $x --- " >> $FILE
     echo "----------" >> $FILE
     echo "======================"  >> $FILE
    done
##########################################
for x in $1
    do 
    FILET="_$x-verses-$x.txt"
    echo "======================"  > $FILET
    echo "searched for: $x on `date +'%Y %M %d at %H:%M'`" >> $FILET
    echo "======================"  >> $FILET
     echo "----------" >> $FILET
     echo "-- $x found in kjv `grep -i $x ~/bin/KNb.txt | grep kjv | wc -l` times ---" >> $FILET
     echo "-- $x found in nas `grep -i $x ~/bin/KNb.txt | grep nas | wc -l` times ---" >> $FILET
     echo "----------" >> $FILET
     echo "-- $x was found in the KJV and NAS in these passages:" >> $FILET
     grep -i $x ~/bin/KNb.txt >> $FILET
     echo "----------" >> $FILET
     echo "--- found $x ---" >> $FILET
     echo "----------" >> $FILET
done


Simply Linux: Basics Linux Tackles Microsoft Using BASH on Windows 10
Practical Suggestions for Microsoft Windows
 Full Size Jeep Buyer's Guide
12 hour Video Course by john:
The Art of Linux System Administration
published by O'Reilly Media
Study Guide for the LPIC-2 Certification Exams
search for:
on the internet, or:
JohnMeister.com-fotos
LinuxMeister-Linux
BibleTech- Bible overview

overview of mankind's history
Biblical history:
"Promises and Prophets"

Wagoneers

FULL SIZE JEEPS

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


MeisterTech
Diesels +

One Page Overview of Linux Commands

click for an image of the 5 essential Linux commands

An Intro to Linux
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)