Implementing a shell script and calling the .sh file from bitbucket pipeline.yml
Currently facing an issue to retrieve the files inside a folder in the source code.
need to execute the class files as a post deployment step.
I am using For loop:
for f in /deploy/scripts/* .cls do
echo “$f”
done
the output should be the the class filenames inside scripts folder but it simply returns the string
/deploy/scripts/* .cls
any help or advice how to resolve this?
thanks
That isn't the proper syntax, you need to run:
for f in $(ls /deploy/scripts/*.cls); do echo "$f"; done;
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.