I tried this first. The relevant portion of my script, including some tests and comments is:
Originally Posted by schragge
But, note presence of "folder_files" directory in ls output:
# A test to make double sure of how $1 is set followed by Schragge's last method in post 5:
echo "Dollar-mark1 expands to $1 on line 49 just before last method of Schragge in post 5." >> /media/wdsm3/script_testing/test.sh.output.txt
find \"$1\" -maxdepth 1 \( -type d -name \*_files -o -type f -regex '.*\.html?$' \) -printf found -quit
]] && echo "yep, some html components are present in $1." >> /media/wdsm3/script_testing/test.sh.output.txt || echo "nope, no html components are present in $1." >> /media/wdsm3/script_testing/test.sh.output.txt
When I run the script against the same "test_ folder", I get this in test.sh.output.txt, the last two lines of which are the point:
me@precise:~$ ls "/media/wdsm3/script_testing/test_ folder"
file .txt html_components subdirectory
folder_files ordinary_file.txt subdirectory with spaces
folder_files,hacksaws ordinary file with spaces.txt
So, it isn't responding to "folder_files" as something that should elicit the "yep . . ." response. I tried removing the escape character prior to the *. Seperately, I tried replacing with something modeled on the later part
test.sh begins processing another file here -----------------------
/media/wdsm3/script_testing/test_ folder is dollar one.
_variable_filename_end is set to folder
Dollar-mark1 expands to /media/wdsm3/script_testing/test_ folder on line 49 just before last method of Schragge in post 5.
nope, no html components are present in /media/wdsm3/script_testing/test_ folder.
I failed to save it but I think it was
Still the same result. I have a lot of tinkering still to do and other expressions to try, but I thought, rather than one massive post, it would be clearer if I posted progress as I made it.