I have a code which is supposed to encrypt every file within a folder but when I put it (the encryption code) within the infinite loop it does not work.
touch Out_file.txt
ls > Out_file.txt
i = 0
while:
i = i + 1
line=$(head -n $i Out_file.txt)
openssl cbc -aes-256-cbc -pass pass:Hello123 -p -in $line -out $line.enc
done
It might be able to encrypt all your files within the folder you are running the program in so please proceed with caution
How about:
(just simplifying how we generate the list of files and run through them)
Good Luck.