#!/bin/sh
#] 
#] *********************
#] $ bash "$d_bin""0_list Howells [bash scripts, QNial operators].sh"
# www.BillHowell.ca 10Jan2018 initial, 23Jan2020 made more portable, based on "standard header.sh"
# 09Oct2020 - updated, didn't list [functions, operators, etc] based on '#] '

source  "$d_bin""standard header.sh"

p_temp="$d_temp""0_list Howells [bash scripts, QNial operators] temp.txt"


#] find_files_comments()  - generate list of files by find, then [extract, modify] special comment lines

	find_files_comments()
{  
beval 'find "'"$1"'"  -name "'"$2"'"  |  grep  --invert-match  "z_Old"  |  grep  --invert-match  "z_Archive"  |  sort  |  tr  \\n  \\0  |  xargs -0  -IFILE  grep  "#\] " "FILE"  |  sed "s/#] /\t/"  >>"'"$p_log"'"  ' 
}  


# 

#] process_bins()  - bash script files

	process_bins()
{  
p_log="$d_bin""0_list of Howells bash_scripts.txt"
mv		"$p_log"  "$d_bin""z_Archive/$(date +%e%b%Y-%kh%Mm) 0_list of Howells bash_scripts.txt"
becho "$(date +%e%b%Y-%kh%Mm)"' :  this file was generated by "0_list Howells [bash scripts, QNial operators].sh"' 
becho "This listing of bash script files and their functions is NOT substantially complete.  Many of my [bash, Unix] commands appear within my QNial operators, and in the furture these should be listed as well.  I have been using [bash, Unix] commands as one of my two main computer language tools for less than a decade, so my library isn't very mature.  I also need to port many QNial programs to bash versions, and to hybridize [bash, Qnial] more.  " 
becho "" 


becho "************************************************"  
find_files_comments  "$d_bin"					'*.sh'
becho ""  
becho ""  

becho "************************************************"  
find_files_comments  "/home/bill/bin/"		'*.sh'
becho ""  
becho ""  
}  


#] process_ndfs()  - QNial ndf files (programs)

	process_ndfs()
{  
p_log="$d_Qndfs""0_list of Howells QNial programs.txt"
mv		"$p_log"  "$d_Qndfs""z_Archive/$(date +%e%b%Y-%kh%Mm) 0_list of Howells bash_scripts.txt"
becho "$(date +%e%b%Y-%kh%Mm)"' :  this file was generated by "0_list Howells [bash scripts, QNial operators].sh"' 
find_files_comments  "$d_Qndfs"  			'*.ndf'  
}  


#] process_ndf_tests()  - 

	process_ndf_tests()
{  
p_log="$d_Qtest""0_list of Howells QNial test programs.txt"
mv		"$p_log"  "$d_Qtest""z_Archive/$(date +%e%b%Y-%kh%Mm) 0_list of Howells QNial test programs.txt"
becho "$(date +%e%b%Y-%kh%Mm)"' :  this file was generated by "0_list Howells [bash scripts, QNial operators].sh"' 
find_files_comments  "$d_Qtest"  			'*.ndf'  
}  


#	process_bins  
	process_ndfs  
	process_ndf_tests




# $ bash "$d_bin""0_list Howells [bash scripts, QNial operators].sh"

# enddoc
