#!/bin/bash
#M encryptdir encrypt a directory with a password
# Syntax: encryptdir.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 -a -salt -k $2 -in $f -out $f.enc
  #cat $f
done