There will be a directory, which will contain various file types(xlsx, gpg, txt).
If .gpg then only invoke the decrypt.sh or else move the file to output folder.
Anyone who could help me the same?
There will be a directory, which will contain various file types(xlsx, gpg, txt).
If .gpg then only invoke the decrypt.sh or else move the file to output folder.
Anyone who could help me the same?
Assuming
bash
(likely), you can iterate over the files in a directory with thefor
command, such as in the following transcript:You can test if a string variable ends in a specific string by using the regular expression operator:
And, of course, you can run a script or move a file with commands like:
So, combining all that, a good starting point would be (making sure you specify real paths rather than my
/path/to/
placeholders):