Many popular commercial applications offer the possibility to protect an archive with a password. Is there something similar for Gnu/Linux?
Well, first of all one could use one of the those commecial apps, but it’s not advisable for at least three reasons:
This is a quickie: we just have an array like this
(alpha,beta,gamma)
and we want it reversed:
(gamma,beta,alpha)
Here is the code in bash:
a=(alpha beta gamma delta epsilon);
len=${#a[@]};
echo ${a[@]};
i=0;
while (($i < $len/2 )); do
tmp=${a[i]};
a[i]=${a[$len-$i-1]};
a[$len-$i-1]=$tmp;
((i++));
done
echo ${a[@]};