Reputation
1,183
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
7 9
Newest
 Good Answer
Impact
~48k people reached

  • 0 posts edited
  • 6 helpful flags
  • 89 votes cast
Feb
17
comment Is the $SHELL environment variable only for interactive shells?
I'd not be surprised if the vagueness of the specification is to gather for non Unix Posix implementations (such as those for VMS, Windows, ...) where having the normal command interpreter for the target may be what the user expects.
Feb
17
comment Is the $SHELL environment variable only for interactive shells?
"... If the alternate command interpreter did not follow the command line syntax specified in the Shell and Utilities volume of POSIX.1-2008, then changing SHELL would render system() non-conforming. This would affect applications that expected the specified behavior from system(), and since the Shell and Utilities volume of POSIX.1-2008 does not mention that SHELL affects system(), the application would not know that it needed to unset SHELL."
Feb
17
comment Is the $SHELL environment variable only for interactive shells?
BTW, rationale of system contains "One reviewer suggested that an implementation of system() might want to use an environment variable such as SHELL to determine which command interpreter to use. The supposed implementation would use the default command interpreter if the one specified by the environment variable was not available. This would allow a user, when using an application that prompts for command lines to be processed using system(), to specify a different command interpreter. Such an implementation is discouraged."
Feb
17
comment Is the $SHELL environment variable only for interactive shells?
@JoachimBreitner, note that usually make variables are initialized from environment variables (look at a reference for the details), but SHELL is special in that respect (at least for gnu make), it isn't initialized that way.
Feb
17
comment Is the $SHELL environment variable only for interactive shells?
gnu make does not use the environment variable SHELL (but it uses its own SHELL variable to get the shell to use if you set it). Is there variance in that behavior? A lot of people around me are using tcsh and I think it would have broken our makefiles when we were not yet standardized on gnu make and were using the makes provided by Sun, HP and IBM.
Dec
1
comment path of folder within a folder in terminal
@EmmaTebbs, updated to keep the final /.
Nov
27
comment How to create and use dynamic and static libraries in linux (c programming)?
@Dadam, I'm of the opinion that a link is not an answer... it would need at least to be introduced by a summary that I don't feel like writing.
Nov
27
comment How to create and use dynamic and static libraries in linux (c programming)?
A good, but probably too complete for you, reference is akkadia.org/drepper/dsohowto.pdf
Nov
27
comment Why is my IP resolved to 127.0.0.1 instead of the IP I have in the network?
I don't know how python handles sockets, but if you have a socket (that is a pair of ip, port), you should be able to get extract the ip part without having to pass by the host (which is needed for instance when there are several interfaces)
Feb
12
comment nvm command not available in bash script
I'd print the path in the script before calling nvm and check if it is correct.
Dec
5
comment Can't add keyboard layout on Debian remote desktop
The issue is not the VNC protocol, it is the implementation of Xvnc. I've not looked at this for years (that's why I didn't give an answer, I haven't done the minimal research to provide something more than an outdated recollection).
Dec
3
comment Can't add keyboard layout on Debian remote desktop
I know of no X server providing the VNC protocol which has the XKB extension.
Oct
8
comment ANSI escapes in Pash prompt are displayed as garbage in Gnome terminal
You'd need to pipe that through od to be sure, but that doesn't look like ECMA-48 escape sequences, the abundance of %, the matching {} are very suspect and I wonder if you aren't getting the uninterpreted format strings (but I know nothing about C#, so could be totally off about that).
Sep
12
comment Open a directory and let it update itself using “tail -f”
rreverse sort, t sort by time; the result is that newest files are at bottom thus kept by tail.
Sep
10
comment Why does [a-z] asterisk match numbers?
Ok, what I missed was that the range was interpreted according to the current collation sequence.
Sep
10
comment Why does [a-z] asterisk match numbers?
Could you give an example of [a-z] matching more that the 26 letters matched in the C locale? What I remember from when I last looked at this, all encodings practically used in Unix variants had ISO-646 as a base (then the upper 128 codes where used differently, directly for characters in encodings like the ISO-8859-X, combined in encodings like UTF-8 or the EUC family). Even AIX hadn't EBCDIC locales (at least as available to me). I remember trying to find if POSIX/UNIX standards demanded it, but I don't remember the result.
Oct
9
comment Which programme calls csh.cshrc?
IIRC they are read even if the user has a version.
Sep
25
comment Use the system Compose database in Gtk applications
@Gilles, my guess is that the first is for GTK application to use X input method, the second is there to override some desktop settings trying to force every application to behave its way.
Aug
19
comment Cursor keys in bash in dtterm don't work as expected
Most probably not. I've not used it for years (and it seems to me that it was already EOLived then), but I don't remember that DtTerm was as much customizable. Although I think it used the XRessource mechanism, I doubt it used the same widget as XTerm.
Jul
31
comment gmrun stopped searching user added path
@Gilles, one potential source is the bash info manual ;-). At least in edition 3.2, that is given as an alternative way to testing $-. I don't remember why I ended up preferring it to testing $- (I traced back my use to 1999 which is the earlier revision I've not lost)