On Sun, Sep 6, 2009 at 10:50 PM, Steve
Lianoglou<mailinglist.honey...@gmail.com> wrote:
> Hi,
>
> On Sun, Sep 6, 2009 at 11:25 PM, Peng Yu<pengyu...@gmail.com> wrote:
>> Hi,
>>
>> commandArgs gives me the arguments. I am wondering what command can
>> give the whole command line.
>
> What does "the whole command line" mean? Are you looking for the
> command args in one string?
>
> paste(commandArgs(), collapse=" ")
>
> Can you give an example of what you're trying to get?

For example, I run the following command in bash.

Rscript some_script.R a b c

I want to get the string "Rscript some_script.R a b c" in the script
some_script.R.

Regards,
Peng

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to