I've got this script I called it "r1":
for f in "$@"
do
fpath=`dirname "$f"`
file=`basename "$f"`
arc=$fpath"/"$file".rar"
rar a -v1024000 -r -m0 -ep1 -o- "$arc" "$f"
done
It works well but I am not able to change archive name I wish I could do this so the outcome of:
r1 Myphoto Photos/
whould be an archive called Myphoto.rar containing Photos/ dir
How should I modify the script?
I think that this line:
file=`basename "$f"`
should be different, so it will allow me to choose archive name on my own