191 reputation
8
bio website
location
age
visits member for 1 year, 7 months
seen Dec 12 at 19:43

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


Dec
3
comment in Bash, how to not include extra arguments in an alias?
Er...sorry, aliases are recursive. Not sure what I was thinking.
Nov
26
comment in Bash, how to not include extra arguments in an alias?
Note that aliases are extremely simple; they are nothing more than simple string substitution (with the additional limitations that (1) the substitution only happens at the beginning of the command string, and (2) it is non-recursive). There is no way to "configure" how an alias works beyond the definition of the alias itself.
Nov
5
comment How do I print pi (3.14159)?
The "total value"?? Meaning what...?
Sep
24
awarded  Autobiographer
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).