The question that may already have some answers, however I did not find.
I'm kind of lost, I'd say that a little bit confusing even because what I'm asking I think I've already done it in some circumstance of life but I can not remember me for sure how. It was something more-or-less like this:
Code
#Auto-installar pacotes TARBALL no sistema Linux
for N in "/tmp/{abiword, gnumeric, inkscape, gimp, firefox}.tgz"
do
echo -e "$N\t" && sudo tar zxf $N -C /;
done
Quick Explanation
This echo
command followed by its -e
parameter indicates that the name (word) must be displayed one after the other on the same line. Having as a short spacing between each packet name. This space is defined by the \t
For the command tar
I reserved not for the argument -z
, not to leak the stream at extraction time.
Well, anyway! What I want is to show only each package name (s) at any instant, that the tar
command finishes extracting one package and moving to the next and so on until the cycle ends.
Then this way, loop
goes through the /tmp
directory where the *.tgz
packages are located, and the name of the first package must be set on the screen and continuity of the heavy work is done by tar
which in turn decompresses the first packet into the system, and loop
re-runs the /tmp
directory and then re-directs the second name of the second packet and passes the control to tar
perform its task, and so on forward ... until the cycle is set to loop
.
Being installed at all in the moment giving an estimate so that the user has patience because the system was in charge of auto-installing TARBALL in the folder.