so i have a line of code like:
list=$(find . -maxdepth 1 -name "$1" -print0 | sed 's,\.\/,,g')
echo $list
so in terminal when i do bash script_name string
i hope it will display all the files that contain "string"
Now in a folder i have 4 matches : TesT1.c TesT1.h TesT2.c TesT2.h
when i do
bash script_name TesT*
my code only return the first match ,which is TesT1.c
Where did i do wrong, thank you in advance