Reputation
2,479
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
4 20 43
Impact
~195k people reached

Feb
19
comment How to hide files from Bash?
okay... done...
Jan
16
comment Simple sed replacement of tabs mysteriously failing
If I use GNU sed, one \ is enough, as no escaping is necessary. The problem is that BSD sed does not support this syntax for tabs.
Nov
21
comment How can I replace a literal \n with a newline character? (on OS X)
cool.... I don't entirely understand your new solution, but I'll try to pick it apart to understand it...
Nov
21
comment How can I replace a literal \n with a newline character? (on OS X)
I'm on zsh, so maybe it's the zsh history command that does that.
Nov
21
comment How can I replace a literal \n with a newline character? (on OS X)
@TomZych: it's really just the last -e expression that's failing. The rest is just for context. Instead of a newline, I'm getting an n as the replacement with the code as shown if I use sed instead of gsed. But I tried lots of different things and none of them worked except using gsed.
Oct
29
comment Is it possible to create and use menus in (terminal-based) vim?
@Alexey: thanks! that's very helpful to know... if I scroll down to section "5.2 Creating New Menus" that looks like it'll do what I want.
Oct
15
comment How do I get rid of Cygwin's /cygdrive prefix in all paths?
@underscore_d: fair enough. thanks for the info!
Aug
30
comment Is the chromebook Linux based at its core?
SSH was just an example. A more detailed list of what is included—or at least some more examples—would be useful, and perhaps also some examples of what is not included.
Aug
18
comment How do I *reliably* and *simply* get the current shell interpreter name?
yes, I've run into this already. The worst thing is fish won't even load a script that has syntax it doesn't like, so you can't just send STDERR to /dev/null. But I have a solution, which I will post once I've got it all working.
Aug
17
comment How do I *reliably* and *simply* get the current shell interpreter name?
@StéphaneChazelas: I think you are right that it's generally not worth the effort (certainly generally not, and maybe always not) but I'm not ready to give up... I think the problem breaks down into 2 problems really: 1st getting the shell name, and 2nd using it. Both (at least practically) require some outside help to avoid the limitations of the shells that you could be using. I've solved the first problem with a small utility written in Crystal, and when I find time I want to solve the 2nd one as well. Btw, your solution is brilliant, but obviously very complex.
Aug
11
comment How do I *reliably* and *simply* get the current shell interpreter name?
@G-Man: updated. Please take a look and let me know if you have any more questions.
Aug
11
comment How do I *reliably* and *simply* get the current shell interpreter name?
@G-Man: I'm curious why you haven't "unmarked" this as a duplicate yet. I can give you several more differences between what I'm asking for and Stéphane’s answer if you need it.
Aug
9
comment How do I *reliably* and *simply* get the current shell interpreter name?
Also, his approach doesn't give just the name, and it's certainly not simple. I've worked out an approach that I think meets all these criteria, which I've published to GitHub.
Aug
9
comment determine shell in script during runtime
Yes, the latter: from an interactive zsh session I ran whatshell.sh.
Aug
9
comment How do I *reliably* and *simply* get the current shell interpreter name?
@gwillie: btw I up-voted this since I think it was a noble attempt, and since you gave a warning that it doesn't work it seems that there's no reason to 'punish' you with downvotes as some people did... I'm not sure if SE will let you delete it to prevent more downvotes but you might want to consider that
Aug
9
comment How do I *reliably* and *simply* get the current shell interpreter name?
yeah, his answer is extremely interesting and impressive, but it unfortunately misidentifies zsh on my system as bash. I have other qualms about it—though whoever wrote it seems to be a genius—but that's the biggest one.
Aug
9
comment determine shell in script during runtime
This is extremely interesting and impressive, but it identifies zsh on my system as bash 3.2.53(1)-release.
Aug
9
comment How do I *reliably* and *simply* get the current shell interpreter name?
@G-Man: I explained in my comments and an update to my question how the other question mentioned doesn't provide an answer my question.
Aug
9
comment How do I *reliably* and *simply* get the current shell interpreter name?
I'm asking for something cross-platform, which for me would include not just Linux (Debian and Red Hat based distros), but also OS X, Solaris, and major BSD variants at a minimum. I'll make this more explicit in the question, since when I posted the question I was expecting that there would be something inside the shells that could give us this info, which appears not to be the case.
Aug
9
comment How do I *reliably* and *simply* get the current shell interpreter name?
Yes it may appear at first glance to be a duplicate, but it's not. The accepted answer for that question fails for me on (1) zsh, (2) fish, (3) sh, (4) bash, (5) csh, (6) tcsh, and (7) ksh, and I gave up testing after that. Since it is relying on something outside of the shells themselves, it should be common across most major platforms, but that solution appears to be Linux only. (continued...)