#!/bin/bash
# 28 oct 2013 - john http://johnmeister.com - updated 8 may 2015
#################################################################
# mkpg - creates a page to display all images in a directory
#################################################################
CAT=/usr/bin/cat
CP=/usr/bin/cp
DATE=`date | cut -c 5-11` ; export DATE	 # echo $DATE
FDATE=`/bin/date +%d%b%y-%H%M` ; export FDATE # echo $FDATE
GREP=/usr/bin/grep 
LS=/usr/bin/ls 
MKDIR=/usr/bin/mkdir 
MV=/usr/bin/mv 
PERL=/usr/bin/perl
SORT=/usr/bin/sort
TITLE="`echo "$1"`" ; export TITLE ; echo $TITLE
UNIQU="/usr/bin/uniq -u"
VI=/usr/bin/vi
WCL="/usr/bin/wc -l"
##############################################
# create backup copies of ALL, Header, Readme and footer files
##############################################
$MKDIR z 2>/dev/null
$MV ALL.html z/ALL.html-`/bin/date +%Y-%m-%d-%Hh%Mm` 2>/dev/null
$MV README.html z/README-`/bin/date +%Y-%m-%d-%Hh%Mm` 2>/dev/null
$MV HEADER.html z/HEADER-`/bin/date +%Y-%m-%d-%Hh%Mm` 2>/dev/null
$MV FOOTER.html z/FOOTER-`/bin/date +%Y-%m-%d-%Hh%Mm` 2>/dev/null
##############################################
$CP /var/www/thisdomain/public_html/README.html README.html
$CP /var/www/thisdomain/public_html/HEADER.html HEADER.html
$LS z
##############################################
# create new ALL.html file - TOP
##############################################
echo "<html><head><title>$TITLE - john meister © 2015</title>" > ALL.html
$CAT /home/some-user/bin/BASE/A >>  ALL.html
##############################################
# create <h1> tag for page - take from mkpg cmd
##############################################
echo ""  >> ALL.html
echo "<center><h1> $TITLE </h1>" >>  ALL.html
##############################################
#  image tags and place D600, D7100, canon files
##############################################
$LS *.jpg > IMGs 2>/dev/null
$LS *.JPG >> IMGs 2>/dev/null
$CAT IMGs | $GREP JM6 > IMG.html 2>/dev/null
$CAT IMGs | $GREP JM7 >> IMG.html 2>/dev/null
$CAT IMGs | $GREP D7K >> IMG.html 2>/dev/null
$CAT IMGs | $GREP JEM >> IMG.html 2>/dev/null
$CAT IMGs | $GREP IMG >> IMG.html 2>/dev/null
$LS *.jpg *.JPG | $GREP -v JM6 | $GREP -v JM7 | $GREP -v JEM | $GREP -v IMG >> IMG.html 2>/dev/null
$PERL -pi -e 's/(.*)/<img src="$1"><BR>$1<HR>/g' IMG.html   2>/dev/null
$PERL -pi -e 's/<img src=""><BR><HR>//g' IMG.html   2>/dev/null
##############################################
$CAT IMG.html >> ALL.html
##############################################
# close out content section, add Footer
##############################################
echo "</center>" >> ALL.html
$CAT /home/some-user/bin/BASE/B >> ALL.html
echo " the numbers on the left should match:  "
$MV IMGs z ; $WCL z/IMGs
$MV IMG.html z ; $WCL z/IMG.html
echo " end of ALL.html creation, backup files in z "
##############################################

Simply Linux: Basics  Full Size Jeep Buyer's Guide Using BASH on Windows 10
Practical Suggestions for Microsoft Windows
Linux Tackles Microsoft
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)