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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -