0
The question that perhaps already have some answer, however I did not find.
I’m kind of lost, I would say that a little confused even because what I’m asking I think I’ve done it in some circumstance of life but I’m not getting it reminds me exactly 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 command echo
followed by your parameter -e
indicates that one must display the name(word) one after the other being on the same line. Having as a brief spacing between each package name. This space is defined by the operator \t
To command tar
I reserved myself not to make the argument -z
, not to leak the flow at the time of extraction.
Good, anyway! What I want, is to show only each package(s) name(s) every instant that, the command tar
finishes extracting a package and, move to the next and so on until the cycle ends.
So stay that way, the loop
go through the directory /tmp
where the packages are situated *.tgz
, and should set the name of the first package on the screen and in continuity the heavy work is on account of tar
which in turn uncompromises to the system the first package, and the loop
goes through the directory /tmp
and again arrow the second name of the second package and passes the control to the tar
perform its task, and so on ... until the cycle set in the loop
.
Being the whole installed(s) at the moment giving thus, an estimate so that the user has patience because the system was in charge of self-installing the TARBALL housed in the folder.
if I understand correctly, you have to use the command
tar -xf $N
so it ripped the content without showing which files are being extracted.– Brumazzi DB
@Brumazzidb Oops! I made an ugly mistake,
z
that gives the flow print when extracting, confuses me with thev
. But anyway Brumazzidb. Note that I need to highlight the name without the package extension, hide the data stream while thetar
does its job, and finishing the first extract, goes to the second package displays its name just in front of the first package, passes the control to thetar
perform and finish the second extraction, now displays the third name of the package in front of the second and starts the extraction, and goes to the fourth etc.– Diego Henrique
I think I understand if the package is called
firefox.tar
you want me to writefirefox
, correct?– Brumazzi DB
@Brumazzidb Yes! This is your correct assumption. Note that it should first display the name of the package in question in which it will be unpacked, giving a certain amount of time to each other in order to show the name of the next package to be unpacked, and then proceed to the next one. What I want is similar to a Progress-bar, visualizing the name of the file by which the data is being extracted at that moment, and so to do with all, as it is being extracted, the name of the package is also being displayed.
– Diego Henrique