An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-debian/attachments/20140306/475ea874/attachment.pl>
Default shell in Debian 6 of R is SH instead of BASH
9 messages · Harutyun Khachatryan, Johannes Ranke, Don Armstrong +1 more
Hi, Am Donnerstag, 6. M?rz 2014, 23:46:28 schrieb Harutyun Khachatryan:
Dear all, I am experiencing this problem with R in Debian 6. The config saying about default shell in R for Debian 6 is in file /usr/lib/R/etc/Makeconf (line 80 "SHELL = /bin/bash")
The comment on line 67 suggest that this variable is only used during the build process.
but in Debian 6 default shell for R is always SH instead of BASH.
The default shell in Debian 6 is dash (it was bash before): https://wiki.debian.org/Shell
It can be checked by just
typing in R system("echo $BASH_VERSION"). The same command system("echo
$BASH_VERSION") in R for Centos 6.5 answers "4.1.2(1)-release". Also for
Debian 6 in terminal command "echo $BASH_VERSION" also answers
"4.1.2(1)-release". So it seems it is the problem of R configuration for
Debian 6.
I see no problem to use bash during the build process and have dash as the default shell for the system. bash and dash happily coexist.
I have installed R from CRAN by method described in http://cran.r-project.org/bin/linux/debian/.
Were you successful?
The same problem exists for Ubuntu 12.04. I suppose this kind of problem exists for every Debian like i.e. Ubuntu, Linux Mint, and others system.
It seems to me that there is no problem. Johannes
Thank you in advance. Regards, Harutyun Khachatryan. [[alternative HTML version deleted]]
_______________________________________________ R-SIG-Debian mailing list R-SIG-Debian at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-debian/attachments/20140307/0995c046/attachment.pl>
Well, R is cross-platform. If you issue system commands I think it is clear that it may differ depending on the system (think if Windows or Mac). Anyway, you would need to bring this up on debian-devel or the respective fedora lists, as it seems to me you are complaining about the system defaults. As far as I can see, this is not under the control of the R packaging. Please correct me if I am wrong. Johannes Am Freitag, 7. M?rz 2014, 01:24:42 schrieb Harutyun Khachatryan:
The problem is that for R in CenOS 6.5 default SHELL is BASH instead of dash. This arouse some compatibility issues running the same shell script from R in different systems like CentOS, Fedora, OpenSUSE, Mageia versus Debian, Ubuntu, Linux Mint. So one must take care running shell script in R depending Linux distributive version. I do not think it is good practice. On Friday, March 7, 2014 12:10 PM, Johannes Ranke <jranke at uni-bremen.de> wrote: Hi, Am Donnerstag, 6. M?rz 2014, 23:46:28 schrieb Harutyun Khachatryan:
Dear all, I am experiencing this problem with R in Debian 6. The config saying about default shell in R for Debian 6 is in file /usr/lib/R/etc/Makeconf (line 80 "SHELL = /bin/bash")
The comment on line 67 suggest that this variable is only used during the build process.
but in Debian 6 default shell for R is always SH instead of BASH.
The default shell in Debian 6 is dash (it was bash before): https://wiki.debian.org/Shell
It can be checked by just
typing in R system("echo $BASH_VERSION"). The same command system("echo
$BASH_VERSION") in R for Centos 6.5 answers "4.1.2(1)-release". Also for
Debian 6 in terminal command "echo $BASH_VERSION" also answers
"4.1.2(1)-release". So it seems it is the problem of R configuration for
Debian 6.
I see no problem to use bash during the build process and have dash as the default shell for the system. bash and dash happily coexist.
I have installed R from CRAN by method described in http://cran.r-project.org/bin/linux/debian/.
Were you successful?
The same problem exists for Ubuntu 12.04. I suppose this kind of problem exists for every Debian like i.e. Ubuntu, Linux Mint, and others system.
It seems to me that there is no problem. Johannes
Thank you in advance.
Regards, Harutyun Khachatryan.
[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Debian mailing list R-SIG-Debian at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[[alternative HTML version deleted]]
PD Dr. Johannes Ranke Kronacher Str. 8 79639 Grenzach-Wyhlen
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-debian/attachments/20140307/8c440d54/attachment.pl>
It is documented in the R help file for system() that /bin/sh is used (they mention that it has to be used). Also there are some warnings that different systems behave differently. I do not see what else could be done at the moment. Am Freitag, 7. M?rz 2014, 01:54:44 schrieb Harutyun Khachatryan:
I do not think so. In Debian when user logs in shell through ssh it starts
bash instead of dash and even when you start terminal in Debian X window
system it also starts bash. So if one run command in Debian shell it runs
by bash. I think R in Debian also should run system("****") commands with
bash. Because otherwise it so confusing. Let's consider the situation: one
connects to Debian server through SSH, runs some shell script in R by
system(**) then the same command in simple shell (i.e. bash) and get
different answer. Also BASH more popular than dash. Now R users in Debian
have to take care how bash script will run in dash.
On Friday, March 7, 2014 1:32 PM, Johannes Ranke <jranke at uni-bremen.de>
wrote:
Well, R is cross-platform. If you issue system commands I think it is clear
that it may differ depending on the system (think if Windows or Mac).
Anyway, you would need to bring this up on debian-devel or the respective
fedora lists, as it seems to me you are complaining about the system
defaults. As far as I can see, this is not under the control of the R
packaging. Please correct me if I am wrong.
Johannes
Am Freitag, 7. M?rz 2014, 01:24:42 schrieb Harutyun Khachatryan:
The problem is that for R in CenOS 6.5 default SHELL is BASH instead of dash. This arouse some compatibility issues running the same shell script from R in different systems like CentOS, Fedora, OpenSUSE, Mageia versus Debian, Ubuntu, Linux Mint. So one must take care running shell script in R depending Linux distributive version. I do not think it is good practice. On Friday, March 7, 2014 12:10 PM, Johannes Ranke <jranke at uni-bremen.de> wrote: Hi, Am Donnerstag, 6. M?rz 2014, 23:46:28 schrieb Harutyun Khachatryan:
Dear all, I am experiencing this problem with R in Debian 6. The config saying about default shell in R for Debian 6 is in file /usr/lib/R/etc/Makeconf (line 80 "SHELL = /bin/bash")
The comment on line 67 suggest that this variable is only used during the build process.
but in Debian 6 default shell for R is always SH instead of BASH.
The default shell in Debian 6 is dash (it was bash before): https://wiki.debian.org/Shell
It can be checked by just
typing in R system("echo $BASH_VERSION"). The same command system("echo
$BASH_VERSION") in R for Centos 6.5 answers "4.1.2(1)-release". Also for
Debian 6 in terminal command "echo $BASH_VERSION" also answers
"4.1.2(1)-release". So it seems it is the problem of R configuration for
Debian 6.
I see no problem to use bash during the build process and have dash as the default shell for the system. bash and dash happily coexist.
I have installed R from CRAN by method described in http://cran.r-project.org/bin/linux/debian/.
Were you successful?
The same problem exists for Ubuntu 12.04. I suppose this kind of problem exists for every Debian like i.e. Ubuntu, Linux Mint, and others system.
It seems to me that there is no problem. Johannes
Thank you in advance.
Regards, Harutyun Khachatryan.
[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Debian mailing list R-SIG-Debian at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[[alternative HTML version deleted]]
PD Dr. Johannes Ranke Kronacher Str. 8 79639 Grenzach-Wyhlen
Johannes is entirely correct. Debian just assumes a sh-compatible shell. I think we're now on dash, it was ash for a while. These are used to keep the _boot_ system smaller where we have not used bash as the default /bin/sh in maybe a decade. Some, but few, scripts were adjusted. Users still default to bash. R, for the record, tries very hard not to default to things like bashisms or GNU extensions to make as it tries (and succeeds) to build everywhere. What shell to use _locally_ is a local policy decision and can be overridden. If your scripts need bash, you can could - either rewrite them to only sh constructs (a pain) - override the Debian default and make bash the default This has little to nothing to do with R-on-Debian so this list is the wrong place. Dirk
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
3 days later
On Fri, 07 Mar 2014, Dirk Eddelbuettel wrote:
What shell to use _locally_ is a local policy decision and can be overridden. If your scripts need bash, you can could - either rewrite them to only sh constructs (a pain) - override the Debian default and make bash the default
Just for the record, if you scripts need to use bash, they should have #!/bin/bash in the shebang line. If your scripts can use any POSIX shell, then they should have #!/bin/sh in the shebang line. This should resolve any of the problems you are having regardless of which shell happens to be /bin/sh.
Don Armstrong http://www.donarmstrong.com I finally developed a computer with feelings. It just doesn't have feelings for me. -- a softer world #633 http://www.asofterworld.com/index.php?id=633
On 10 March 2014 at 11:24, Don Armstrong wrote:
| On Fri, 07 Mar 2014, Dirk Eddelbuettel wrote:
| > What shell to use _locally_ is a local policy decision and can be | > overridden. If your scripts need bash, you can could | > - either rewrite them to only sh constructs (a pain) | > - override the Debian default and make bash the default | | Just for the record, if you scripts need to use bash, they should have | #!/bin/bash in the shebang line. If your scripts can use any POSIX | shell, then they should have #!/bin/sh in the shebang line. This should | resolve any of the problems you are having regardless of which shell | happens to be /bin/sh. Quite so. And as I believe you were addressing this comment to the OP, I am adding him back as a CC just in case. Dirk
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com