find not work on having space within string variable for -path or -iregex, etc
by BudiKusasi from LinuxQuestions.org on (#59HJB)
Why can't find work on having space within string variable for -path or -iregex find's option.
This input Code:'/home/demo.*/\.config/File System/.*t$'is fed on:
Code: read i
m="-iregex $i"
find ~ $mwon't work as it will if constant, not variable
so is not `find ~ \'$m\'` nor `eval find ~ \'$m\'`
How's the correct solution ?


This input Code:'/home/demo.*/\.config/File System/.*t$'is fed on:
Code: read i
m="-iregex $i"
find ~ $mwon't work as it will if constant, not variable
so is not `find ~ \'$m\'` nor `eval find ~ \'$m\'`
How's the correct solution ?