Hi,
I have a requiremnet where i need to apply logic on directories and sub-direcotories.
Example:
base="/a/b/c"
base1="/a/b/c/d/e"
subfolders in both base and base1 are same : es, ig, os
var1=es
var2=ig
var3=os
Now i have used the follwoing lines in my code and these are creating problem
for dir in "($base | $base1)/$var1" "($base | $base1)/$var2" "($base | $base1)/$var3"
do
(
echo "The current directory is:"`pwd` >> ${LogFile}
cd "$dir" || continue
for i in *.*
do
(
touch "$i" && printf 'Success: %s\n' "$i" || printf 'Failed: %s\n' "$i" >> ${LogFile}
)
done
\)
done
Please suggest on the above code .
while executing for loop it is not working.