161 reputation
7
bio website
location
age
visits member for 1 year, 4 months
seen Aug 21 at 15:02

I am a software engineer at Beckman Couleter, Inc. I enjoy reading, playing piano, and dancing.


Aug
21
awarded  Teacher
Jul
29
revised Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
added 7 characters in body
May
30
revised Copy specific file type keeping the folder structure
added 129 characters in body
May
29
answered Copy specific file type keeping the folder structure
Mar
19
comment Should scripts that require sudo fail if they don't have it, or use sudo and prompt?
@terdon For a script this simple, I consider a usage-inconvenience to be a (minor) problem to be solved. In this context, the alias is indeed a solution.
Mar
19
comment Should scripts that require sudo fail if they don't have it, or use sudo and prompt?
@terdon I recognize that I could have been slightly clearer, but presumably you know what I meant: the recipient of the script will face the same problem originally faced by the author of the script, and as a conscientious script-sharer, the author should also share their personal solution to this particular usage dilemma.
Mar
19
comment Should scripts that require sudo fail if they don't have it, or use sudo and prompt?
@JohnFeminella On the other hand, if you ever want to share this script with anyone else, they'll need the alias, too. Personally, I don't see any reason not to put sudo in the actual script, especially since that allows you to easily see which elements of the script actually require root permissions.
Mar
10
comment Is the shell permitted to optimize out useless terminating commands?
@cHao And even true and false set $?.
Feb
19
comment Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
As pointed out by Mark Plotnick in his comment on the question, qed actually had the g command, too.
Feb
19
comment Alternative to find?
@Mel you are correct that find is consistent; I am hard-pressed to find it "intuitive." For instance, it shouldn't be nearly this difficult to figure out how to prune branches of the directory tree: stackoverflow.com/questions/4210042/… (Note the disparities between the top three (!) answers.)
Feb
19
comment Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
@MarkPlotnick Well, that answers part one! Nicely done.
Feb
18
awarded  Commentator
Feb
18
comment Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
Anyway, thanks for your explanation of some of the different ways regex can be used in editor commands. I think that by being somewhat vague in my terminology I gave the impression of being more confused by usage than I actually am, since I actually feel like I have a fairly solid understanding of how to use regex in Vim, sed, Perl, etc; I just want to understand the history a little better. I've made a minor edit to the original question to try to clarify this.
Feb
18
awarded  Editor
Feb
18
revised Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
Minor edit attempting to clarify that by `//g` I meant "the g flag for regex used incommands"
Feb
18
comment Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
Second, I am aware of the differences, and I think my question indicates that awareness; in particular, I said that the two things "have pretty similar usage and meaning." This is, presumably, why they share the same letter even though in one case g is the command name (and is explicitly abbreviated from "global" in the help documentation) and in the other it's a flag (and, as far as I know, is not explicitly said to be an abbreviation for "global" in any editor documentation--though Programming Perl, for instance, does make this association).
Feb
18
comment Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
First, qed didn't have any regex support; that was (according to a couple different versions of the story) the primary leap forward with ed. So I'm not sure what you mean about not being able to imagine how such an editor "would function," since there are plenty of other editing commands.
Feb
18
asked Regex `/pattern/g` and ed `:g/pattern/`: which came first, and why `g`?
Feb
7
comment Why does `ESC` move the cursor back in vim?
+1 here as well, for citing the wiki page, even though the user wasn't actually asking for a way to change this behavior.
Feb
7
comment Why does `ESC` move the cursor back in vim?
In general, after each change, when I leave that change, I'm done with that change, and the next thing I would like to do will probably involve making a different change. Thus, to me, upon leaving insert mode (no matter how I entered it), I'd generally prefer the cursor to be on the next character so I'm ready for my next change, rather than being ready to change what I just inserted.