Re: creating RPMs from CRAN tarballs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 06/06/2015 03:21 AM, Nicolas Thierry-Mieg wrote:
>>> perl -pi -e 's:^#!/usr/bin/r:#!/usr/bin/R: unless $i++'
>>> path/to/R/scripts/*.R
>>
>> I assume the "unless $i++" is supposed to limit the replace operation to
>> only the first line each file.  Unfortunately, since it is a global
>> variable, it is actually limiting it to only the first line of the first
>> file.

Yeah, it was untested code off the top of my head and you are correct.

> just replace it everywhere, /usr/bin/r doesn't exist anyways, but make
> sure there's nothing after the r:
> perl -pi -e 's:^#!/usr/bin/r\s*$:#!/usr/bin/R:' whatever/*.R

This should work.


Peter
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux