Saying, I have this tree and I want to execute ruby on all scripts within the folder. How could I archive through one line of command.
./
../
rb-script/
sample1.rb
sample2.rb
|
Saying, I have this tree and I want to execute
|
||||
|
|
|
Something along the lines (depending on your shell) of
should do the trick; alternatively (and shell-independently, I think)
using
In general, |
||||
|
|
|
If this will be part of a daemon, you could use the run-parts command to execute everything in the folder in alphabetical order. This command is especially useful if you need to execute it in reverse order for shutdown. |
|||
|
|