bash - store all files name in a variable from directory/subdirectoy unix -
i want store files of *.mk type in variable sub directories , use in program. tried below command it's not working.
shell script:
for in `find . -name *.mk` echo $i done
it's showing below error message. bash: ./make_files.sh: line 6: syntax error near unexpected token echo' bash: ./make_files.sh: line 6:
echo $i'
it's not printing anything.
try either in `find . -name '*.mk'`; echo $i done
or
for in `find . -name '*.mk'` echo $i done
note use of quoting, too.
Comments
Post a Comment