437 reputation
419
bio website
location
age
visits member for 2 years, 2 months
seen 2 hours ago

Shyy erny anzr - Naqernf Rvonpu


10h
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
Bleh! Nobody noticed that major mistake? Must be NUMBER (or "amount") of volumes, not length! Very funny, multi-volume usually uses a fixed length. Haha.
11h
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
Hey! This is about *multi-volume* tar, which is only available in GNU tar. So please let the GNU stay.
18h
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
improved formatting, shortened yet a little bit
19h
comment Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
No it does NOT!! I'll clearly contradict you here. Because the reason why you may run into this in the first place IS very probably tar's strange behavior to always require the user to enter the follow-up volume manually, which is a little annoying (to say the least). Hence I was looking for a solution to script it AND to use least resources possible. (Remember I had a solution, but I was not really satisfied with it.) As the upvoters-to-downvoters is (somewhat) balanced at the moment, I'm certainly not going to cry a river over getting downvoted. ;P
22h
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
perhaps this is really a bit long. maybe I can put the sed stuff in mere prose.
22h
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
added 279 characters in body
22h
comment Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
YES! The seq approach works perfectly! (Why didn't I think of that.) Thank you so much.
22h
comment Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
Right in fact! :-) But by giving all that context, I wanted to avoid foolish answers like "why not omit eval and just use echo -e {2..4}'\n' instead"? It's because most people always love questioning you why you need it in that more "complicated" form and cannot use a "simpler" one (even though they might be able to think of the most obvious answer themselves: "because it's just simplified and (mostly) part of a more comprehensive script").
23h
comment Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
eval is required to resolve the brace expansion: {2..$last}. echo alone does not accept a variable either as starting or ending value in braces expansion. See also post #170 here: cyberciti.biz/faq/bash-for-loop/#comment-59251 Certainly, eval can be avoided by just specifying an arbitrary value (like 100), but I did want to match last to the actual last volume.
23h
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
added 2 characters in body
23h
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
typo fix
1d
revised Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
added 163 characters in body
1d
asked Scripting multi-volume (GNU) `tar` with pre-defined number of volumes
Nov
24
comment How to move a file without preserving permissions
Well, I thought as much.
Nov
24
comment What is the difference between mounting in fstab and by mounting in file manager
Oh, I would've presumed that as well! I too have never really been able to keep them apart and to figure out which does what. :)
Nov
23
comment What is the difference between mounting in fstab and by mounting in file manager
@muru Sounds plausible. And to the OP's actual question: Mounting via /etc/fstab here (Lubuntu) will usually mount a partition as /media/somepartition. However, once the partition is not found in fstab, it will get mounted as /media/mycurrentloginID/somepartition. And the mycurrentloginID/ part of the mount point will disappear once I make an entry in fstab.
Nov
23
comment Make sudo ask for a password
sudo means: Do things as if you were root. So do you get asked for password if you type su? If not, I'd know how to "solve" this. (Besides, the -i option is only for instructing the shell to also read the resource files, e. g. .profile / .login etc. Which is to say that sudo ought to show the same (erroneous) behavior with or without -i.)
Nov
23
comment How to prevent `mv` from moving a collection of files into a single regular one?
You can't be serious. If I was in admin staff here, this would never be possible! Remember this gives a decent rep boost with the answering user when you accept their answer! Wouldn't this rep be taken away from the user whose answer you accepted previously? That would mean giving rep boost - user is happy - and snatch it away later, so that user may get really annoyed or upset? Awwww. I couldn't believe it. :-O
Nov
23
comment Using `select` command to print menu in Linux
It is particularly important to note that the break statements in the code snippet shown are not for case, but in order to prematurely exit that select block! While you will (um, generally) need a break even for each case in a switch-case block in C language, for shell scripts you never will. So if there was no select, all the break statements could be omitted as well (in shell scripting). Just wanted to point that out, as it can easily be misread.
Nov
23
comment Using `select` command to print menu in Linux
@glenn jackman I would like to have this turned into a more helpful comment (see next). So it would be great if you agreed on deleting your comment from 12:55. I will do the same with mine, of course.