when I want to execute some script shell on Unix (and let them say that I’m in the directory where the script is located), I simply type:
./someShellScript.sh
and when I want to "source" it (for example, run it in the current shell, and not in a new shell), I just type the same command with only "." (or with the equivalent of the "source" command) before it:
. ./someShellScript.sh
And now the hard part. When I want to execute "multiple" shell scripts (say, all files with the suffix .sh) in the current directory, I print:
find . -type f -name *.sh -exec {} \;
but "which command should be used for scripts with multiple" SOURCE "scripts in the directory" ?
I have tried this so far, but it has NOT worked:
find . -type f -name *.sh -exec . {} \;
and he just threw this error:
find: `.': Permission denied
Thank.
source
share