menu script - 2002


#!/bin/sh # date: April 4, 2002 # author: john # script to identify list of files # then provide user with option of opening # # add later: find /export/home/john/ -name "*.txt" >> list # create a menu by displaying current directory and # assigning number. COUNT=0 for x in `ls` do set * COUNT=`expr $COUNT + 1` echo "$COUNT> $x $!" done set * echo echo "Enter a number from 1 to $#: \c" read LIST while [ $LIST != 1 ];do LIST=`expr $LIST - 1` shift done echo "You picked \"$1\"!" exit

menu script - 2004

#!/bin/sh
#  menu script - john - 4/2004  UnixMeister
if [ -z "$EDITOR" ]  
 then  
 EDITOR=vi  
fi ; clear # clear screen before menu   
while true  
do
#  NOTE:  lines wrapped with ; to save space on screen
  echo "   " ; echo " --------------------------"
  echo "|       INFO MENU	  |" ; echo " -------------------------- "
  echo "| 1 - Time                |" ; echo "| 2 - Day                 |"
  echo "| 3 - Date                |" ; echo "| 4 - Year                |"
  echo "| 5 - Time Zone           |" ; echo "| 6 - Hostname            |"
  echo "| 7 - Kernel version      |" ; echo "| 8 - enter vi Editor     |"
  echo "| q - Return to Shell     |" ; echo " ------------------------ "
  echo "Enter menu choice: " ;  echo " "; read input; echo " "
    case $input in
    1) date | awk '{print "    Time:   "$4}' ;;
    2) date | awk '{print "    Day:    "$1}' ;;
    3) date | awk '{print "    Date:   "$2 " "$3}' ;;
    4) date | awk '{print "    Year:   "$6}' ;;
    5) date | awk '{print "    Time Zone:   "$5}' ;;
    6) hostname | awk '{print " (hostname)   Hostname: " $1 }' ;;
    7) uname -r | awk '{print " (uname -r)   Release:   " $1 }'  ;;
    8) echo "to exit vi w/o saving, type: :q! " > tmp_delete; \
      echo "to exit vi saving file, type:  :wq " >> tmp_delete ; \ 
      echo "more vi and UNIX info see http://johnmeister.com/jeep/sj/UNIX " >> tmp_delete ; \ 
      echo "contact John Meister - UnixMeister@comcast.net for training" >> tmp_delete ; \ 
 	$EDITOR tmp_delete ;;
    q)exit ;;
    *)echo Illegal command ;;
    esac
done



ebook:
Full Size
Jeep Buyer's
Guide
ebook:
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


An overview of 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)