#!/bin/sh
#] 
#] *********************
#] $ bash "$d_bin"'linux.sh'  - key cmds cart [options, usage], txtEd for full view
# www.BillHowell.ca  15Apr2022 initial 
# view in text editor, using constant-width font (eg courier), tabWidth = 3


#*********************
# Run  

flag_loop=1

while [[  1  ==  "$flag_loop"  ]]
do 

echo	''
echo	'******************************'
echo	'Select one of (or `q to quit) : '
echo	'Most used :               | Other: '
echo	'1. find                   | 12. if statements         | 13. 1_paper review math form.txt'    
echo	'2. grep                   | 22. loop: for             | 23. 0_form bash.sh.txt'  
echo	'3. sed                    | 32. loop: read file       | 33. 0_form notes.txt'  
echo	'4. diff                   | 42. loop: while           | 43. 0_form week Ben Davidson.txt'
echo	'5. date bash notes        | 52. fil[rXiv, attr,]      | 53. 0_form week Ukraine-Russia.txt'  
echo	'6. regular expressions    |                           | 63. 0_form gnuplot.plt'  
echo	'+-----+'
echo	'101. fileops.sh TblOfCont | 111. strings.sh TblOfCont | '
echo	'201. html general         | 201a. html summary        | 205. 0_form html.HtmEml.html '
echo	'202. html tables          |                           | 206. 0_form html.HtmNlk.html'
echo	'203. html styles          |                           | 207. 0_form html.HtmNwp.html'
echo	'210. html quotes          |                           | 208. 0_form html.HtmWeb.html'
echo	'211. txtEd geany          | 212. Greek letters        | '
echo	'+-----+'
echo	'301. QNial dev aides      | 302. QNial [str, date]    | 303. 0_form QNial programs.ndf'
echo	'311. QNial arrays atomic  | 312. QNial arrays nested  | '  
echo	'321. QNial fileops        | 322. 1_QNial text editing optrs etc.txt'  
echo	'+-----+'
echo	'bash variable assignments from : '
echo	'401. expression           | 402. file read as str     | 403. file line number(s)'  
echo	'411. arithmetic (calc)    | 412. ary frm [cmd, file]  | 413. read keyboard input'
echo	'+-----+'
echo	''


read -p "Select by number : "  itm

if		[ "$itm" == "1" ];then
		cat  "$d_SysMaint"'Linux/find notes.txt'							|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "2" ];then
		cat  "$d_SysMaint"'Linux/grep summary.txt'						|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "3" ];then
		cat  "$d_SysMaint"'Linux/sed summary.txt'							|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "4" ];then
		cat  "$d_SysMaint"'Linux/diff summary of key points.txt'   
elif	[ "$itm" == "5" ];then
		cat  "$d_SysMaint"'Linux/date notes.txt'							|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "6" ];then
		cat  "$d_SysMaint"'Linux/regular expression notes.txt'		|  grep "^#\] "  |  sed  's|^#\] ||'

elif	[ "$itm" == "12" ];then
		cat  "$d_SysMaint"'Linux/if statements.txt'						|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "22" ];then
		cat  "$d_SysMaint"'Linux/for loops notes.txt'					|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "32" ];then
		cat  "$d_SysMaint"'Linux/read summary.txt'						|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "42" ];then
		cat  "$d_SysMaint"'Linux/while loop notes.txt'					|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "52" ];then
		cat "$d_SysMaint"'Linux/file [archive, attribute, etc].txt'	|  grep "^#\] "  |  sed  's|^#\] ||'

elif	[ "$itm" == "13" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/1_paper review math form.txt'  
elif	[ "$itm" == "23" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form bash.sh.txt'  
elif	[ "$itm" == "33" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form notes.txt'  
elif	[ "$itm" == "43" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form week Ben Davidson.txt'  
elif	[ "$itm" == "53" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form week Ukraine-Russia.txt'  
elif	[ "$itm" == "63" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form gnuplot.plt'  


elif	[ "$itm" == "101" ];then
		cat  "$d_bin"'fileops.sh'												|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "111" ];then
		cat  "$d_bin"'strings.sh'												|  grep "^#\] "  |  sed  's|^#\] ||'

elif	[ "$itm" == "201" ];then
		cat  "$d_SysMaint"'html/0_html general notes.txt'				|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "201a" ];then
		cat  "$d_SysMaint"'html/1_html summary.txt'						|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "202" ];then
		cat  "$d_SysMaint"'html/1_html tables notes.txt'				|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "203" ];then
		cat  "$d_SysMaint"'html/1_html styles notes.txt'				|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "205" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form html.HtmEml.html'  
elif	[ "$itm" == "206" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form html.HtmNlk.html'  
elif	[ "$itm" == "207" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form html.HtmNwp.html'  
elif	[ "$itm" == "208" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form html.HtmWeb.html'  

elif	[ "$itm" == "210" ];then
		cat  "$d_SysMaint"'html/8_html quotes.txt'						|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "211" ];then
		cat  "$d_SysMaint"'text processors/geany notes.txt'			|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "212" ];then
		cat  "$d_SysMaint"'text processors/Greek letters.txt'			|  grep "^#\] "  |  sed  's|^#\] ||'

elif	[ "$itm" == "301" ];then
		cat  "$d_Qroot"'0_QNial summary.txt'								|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "302" ];then
		cat  "$d_Qndfs"'strings.ndf'											|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "303" ];then
		bash  "$d_bin"'date update in form.sh'  "$d_web"'Forms/0_form QNial programs.ndf'  
elif	[ "$itm" == "311" ];then
		cat  "$d_Qndfs"'arrays atomic.ndf'									|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "312" ];then
		cat  "$d_Qndfs"'arrays nested.ndf'									|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "321" ];then
		cat  "$d_Qndfs"'file_ops.ndf'											|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "322" ];then
		cat  "$d_Qroot"'1_QNial handy optrs for text editing etc.txt'		|  grep "^#\] "  |  sed  's|^#\] ||'


elif	[ "$itm" == "401" ];then
		cat  "$d_SysMaint"'Linux/variable assignment from expression.txt'	|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "402" ];then
		cat  "$d_SysMaint"'Linux/variable read from file as a string.txt'	|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "403" ];then
		cat  "$d_SysMaint"'Linux/variable as nth line of file.txt'	|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "411" ];then
		cat  "$d_SysMaint"'Linux/arithmetic notes.txt'					|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "412" ];then
		cat  "$d_SysMaint"'Linux/array notes.txt'							|  grep "^#\] "  |  sed  's|^#\] ||'
elif	[ "$itm" == "413" ];then
		cat  "$d_SysMaint"'Linux/read summary.txt'						|  grep "^#\] "  |  sed  's|^#\] ||'
else
		flag_loop=0
fi

done


# enddoc
