#!/bin/bash
#M decryptdir.sh decrypt directory with password
# Syntax: decryptdir.sh file-to-encrypt password
FILES=$1/*
for f in $FILES
do
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  openssl aes-256-cbc -d -a -k $2 -in $f.enc -out $f
  #cat $f
done