1,593 reputation
1028
bio website
location
age
visits member for 3 years, 7 months
seen 1 hour ago

1d
comment Variable assignment outside of case statement
One page I checked (I don't recall where it was) listed the opening ( as optional. I thought it might help avoid letting the ) be misinterpreted as the closing ) for the $(...) expression.
Jul
24
comment How can I suppress the space between generated arguments during brace expansion?
It's a hard call, but I'm choosing this answer because (1) it seems (AFAIK) to be the closest to the stated goal of suppressing rather than merely removing the spaces, and (2) I learned the most from it (a stated goal of my question).
Jul
24
comment How can I suppress the space between generated arguments during brace expansion?
I think this is the simplest and most practical approach
Jul
24
comment How can I suppress the space between generated arguments during brace expansion?
Wouldn't richard's answer be equally compatible? (It also has the advantage of being simpler, therefore I don't have to stop and think about the fiddly bits the next time I want to use it.) On the other hand, Gnouc's answer is also excellent. And I think I learned the most from glenn jackson's answer. Leiaz's answer seems simplest and most elegant, but of course is zsh-only.
Jul
24
comment How can I suppress the space between generated arguments during brace expansion?
at the moment I'm using bash (I'm at work) but on my own laptop I use zsh. I was expecting brace expansion to work identically in both, but perhaps that's not the case.
Jul
24
comment How can I suppress the space between generated arguments during brace expansion?
+1 Thanks--good to know! I'll use that when I'm on zsh. I tagged it that simply because I use both and both support brace expansion. (I don't know if any others do, but I find ksh terribly confusing, so I stay away.)
Jul
18
comment Simple sed replacement of tabs mysteriously failing
Since it didn't work with Ruby either, I'm not sure why I would conclude that OS X's sed is the problem. Do you have a reason to believe that's the problem? I'd be happy to install GNU sed if I had reason to believe it would solve the problem, but it seems like I've pretty much ruled that out.
Jul
16
comment Why does passing a HEREDOC as a string to `ruby -e` not work?
You provided the key insight (and answered first!) and it was fairly obvious to me after reading your answer that I could add double quotes around the the $() expression, but it might not be so obvious to everyone who reads this later, so I'm torn on which answer to accept.
Jul
16
comment Why does passing a HEREDOC as a string to `ruby -e` not work?
Initially I thought this was flawed because I wouldn't be able to use double quotes inside the code, but then realized that even though the HEREDOC is a stream rather than a string (as Kaz points out) it will still hide any internal double quotes from the shell interpreter.
Jul
8
comment How do I get rid of Cygwin's /cygdrive prefix in all paths?
I didn't know there was a way to get the windows drives at /. Did you have that before? (Or at /cygdrive/?) I've always just lived with the fact that I have to know which Windows drives are available, and I hardly ever use them anyway.
Jul
2
comment Strip color on OS X with BSD sed (or any other tool)
The bash version worked without any adjustment needed: you deserve more upvotes than all the people on commandlinefu.com!
Jun
23
comment What is the correct form of the HostnameSuffixes SSH keyword?
Wouldn't the sort of thing you're doing in your examples be accomplished as well with Host leguin williams\n HostName %h.gilles.name\n UserName gilles?
Jun
23
comment What is the correct form of the HostnameSuffixes SSH keyword?
Okay, I missed that mention of it... I guess that's fairly clear there that it's a new option. Thanks!
Jun
23
comment What is the correct form of the HostnameSuffixes SSH keyword?
Yes, but the change initially proposed was not HostnameSuffixes, so it appeared to me that that was an existing keyword. Apparently, if I understand you correctly, you're saying that HostnameSuffixes was being implicitly also proposed as another change, but never explicitly mentioned as such?
Jun
22
comment What is the correct name for the “>” command
Very nice quick reference list, but doesn't <<- remove leading tabs and spaces?
Feb
19
comment Does a duplicate entries in a PATH variable revoke the precedence given by the first entry?
aha! Yes I should have thought of that. The fact that things changed after manually altering my PATH was just coincidence of timing. Makes perfect sense now.
Feb
14
comment Easily get a particular column from output without sed or awk
Actually, the problem here is that the function doesn't take arguments, so it's very narrowly focussed on a specific case, and is not flexible. If you could work out the quoting so that you can pass arguments into it, that would be useful. And of course remove everything before the pipe, so you can use it with any arbitrary input, and specify which columns you want.
Feb
14
comment Easily get a particular column from output without sed or awk
That's an overly-narrow definition of "futz". Would you prefer I used "fiddle"? I'm in no way disputing the value of sed or awk, just pointing out that I don't want to shift focus from one thing to another.
Jan
30
comment When should I not kill -9 a process?
@dhruvbird: just because your DBs are supposed to come equipped with bullet-proof vests doesn't mean you should shoot them if you don't need to. While you may be right that it's not as risky as Arcege seems to say, I think his point still stands that it's risky and should be a last resort.
Jan
16
comment How to hide files from Bash?
D'oh! yes you're right... I forgot that on my Mac I'm usually trying to hide Unix stuff from the window manager, not the other way 'round. Other than .DS_Store OS X doesn't leave its turds lying around, at least not in the home directory. I've corrected the question.