1,683 reputation
1129
bio website
location
age
visits member for 3 years, 8 months
seen Sep 8 at 14:36

Aug
1
comment Succinct way to respond to user input?
Yes: if I change the name of the function to something like user_input then the resulting code reads quite nicely.
Aug
1
comment How to execute a remote command and pass in local file as input?
Okay, I thought you were taking this approach instead of < since you thought writing was required (as was implied by the original title) but you were simply offering another way of doing it (which just happens to allow writing as a side effect).
Aug
1
comment How to execute a remote command and pass in local file as input?
Okay, I must have misunderstood your answer. I didn't try it, but inferred that since you were establishing a reverse tunnel (from remote to local host?) you were allowing the local file to be modified by the remote machine. Is that not the case?
Aug
1
comment How to execute a remote command and pass in local file as input?
@Gilles: I think the original title was misleading, and you understood his question based on the misleading title. As far as I can tell, thought, he didn't actually want to act on the local file, but just pass it in as input. (But your answer is amazing, if I understand it correctly! Maybe I should ask the question you answered, just to give you a place to put the answer where you'll get proper credit for it.) I've edited the questions title to make it consistent with the body and with the chosen answer.
Jul
31
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.