search for: myscript

Displaying 20 results from an estimated 127 matches for "myscript".

2012 Oct 29
6
export variable from bash to R
Dear R experts This probably seems very easy to you guys, but I'm a beginner and would be really glad if someone helped me with this: I am trying to automate the execution of an R script (let's call it "myscript.R") by passing a variable from a bash script to myscript.R. I know I can use the command Rscript, but I don't know how to declare in bash which variable will be accessed by the "commandArgs" command in myscript.R. So my bash script looks about like this: #!/bin/bash VARIABLES...
2005 Feb 25
3
passing command line arguments to 'R CMD BATCH myScript.R'
...problem is: there is a banch of data files which are to be processed by R script called from a web-server, i.e. in the batch mode. The web server generates data files and passes their names calling 'R CMD BATCH' one by one for every file. Now the question is how to call 'R CMD BATCH myScript.R' with parameters, like file name to process? I know how to read the parameters passed to an R script, but I don't know how to pass them. There is an option --args that should cut the rest of the line off the command line. The problem is however that BATCH syntax is: 'R CMD BATCH...
2018 Sep 28
4
Simple bash question
I am calling a bash script and passing in somestring that includes a "$" myscript "$plusmore" I want to assign in the myscript the $1 arg to something like MYTEXT="$1" when I do that I dont get what I'm expecting. if I do MYTEXT='$1' I still dont get what I'm expecting. On the first assignment of MYTEXT I do not want the "$" to...
2010 Nov 02
2
get the scripname within the executed myscript.r
Dear R-users! Is there a way to obtain the name of the executed myscript.r, i.e. when cmd> rscript myscript.r is executed? (The name of the script in this case is "myscript.r") Here is the explanation of why I would like to get that: Why: I have prepared a set of scripts (decompose_data.r, plot_with_higher_resolution.r, plot_3D.r, etc.) placed in a root...
2011 Sep 07
1
process id of an R script
...tion' has been to create a process id file with the currently running script, first checking whether there is another process id file and whether that process is still running. I use the following code: pid <- max(system("pgrep -x R", intern = TRUE)) if (file.exists("/var/run/myscript.pid")) { rm(pid) pid <- read.table("/var/run/myscript.pid")[[1]] if (length(system(paste("ps -p", pid), intern = TRUE)) != 2) { stop("Myscript is already running in another process.") } else { pid <- max(system("pgrep -x R", intern = TRUE)) write(p...
2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script from within that script. fir instance If I have a script "myscript.r": FileName<-unknown.fucntion() print(FileName) and run it source("myscript.r") will return "myscript.r" Thanks Nevil Amos [[alternative HTML version deleted]]
2009 Aug 05
4
Autorun ability on cd?
I have a little niggling situation that I would like to resolve programmatically. I use Git as my SCM and I have release branches which are sometimes patched. I find myself sometimes entering the working directory tree forgetting that I was last on a release branch and not on the master. What I would like to do is to have a script run every time that I enter a directory, check for .git, and if
2018 Oct 17
2
dovecot passdb driver=checkpassword as external script for block ip
Refer to https://dovecot.org/pipermail/dovecot/2015-March/099971.html https://wiki.dovecot.org/PasswordDatabase I tried to repeat the same thing. Set these passdb: passdb { args = /myscript.sh ip=%r driver = checkpassword result_failure = return-fail result_success = continue } passdb { args = /etc/dovecot/dovecot-sql.conf.ext ( my working auth method ) driver = sql } Created executable /myscript.sh: #!/bin/sh exit 1 But I saw in the logs: dovecot[15111]: auth: Error: che...
2004 Sep 08
2
'Hangup' not hanging-up, is this intended behaviour?
...g out why it's doing what it's doing. So, I have a dialplan that looks a little like this: -------------------- [start] include => dids include => everythingelse [dids] ; Test exten => 8378,1,SetCallerID(3015551212) exten => 8378,2,Hangup [everythingelse] exten => _.,1,AGI,MyScript|${EXTEN} ${ACCOUNTCODE} -------------------- The 'Hangup' on 8378 doesn't hang up. Instead it falls through to 'everythingelse' context, and the AGI is executed in the hangup priority. -- Executing SetCallerID("SIP/3015551212-5acc", "3015551212") in new...
2011 Oct 12
4
How to access controller's instance variable in a js.erb loaded by javascript_include_tag?
Hello! In rails 3.1 app I have a controller UsersController with ''show'' action. show.html.erb contains: <% content_for(:head) do %> <%= javascript_include_tag ''myscript'' %> <% end %> <p>Hello @user.name</p> And I have this in myscript.js.erb $jQuery(document).ready(function() { alert(<%= @user.name %>); }); @user is being assigned by a controller and it works just ok in show.html.erb, but in myscript.js.erb I get nil as @use...
2008 Oct 23
1
ManageSieve textual fronend wanted
Is there some simple textual frontend to the ManageSieve protocol somewhat easier to use than gnutls-cli? I.e. something to use like managesieve -u ef putscript myscript < /tmp/myscript Password: managesieve -u ef setactive myscript Password: simply doing the TLS authentication and length computation for me.
2017 Jan 30
2
No subject
...to connect to different port 1023 by differentiating with special user, customuser. Following is how i tried, but it doesnt work, please suggest. outside, user issues command ssh customuser at ip, it fails inside sshd_config, i wrote the following: Match user customuser ForceCommand . /etc/myscript inside myscript, I do the following: read -p "Username: " RUSER ssh $RUSER at 127.0.0.1 -p 1023 with this setting, i find these: If i run sshd in debug mode, password is asked in the server window, prints go to client window: server terminal: sshd -d -f /etc/ssh/sshd_config -h /etc...
2006 Jun 20
4
Prototype $A not defined
...ts I often get 3 errors in FireBug. They also show up in firefox javascript console, so I know it is not related to firebug. The error is "$A not defined". And the line is prototype.js:48. My web page include the script like this: <script ... prototype.js...> <script ... myscript.js...> Therefore I would expect that by the time firefox handle myscript.js that prototype is fully loaded. Yet because the error seems to occurs only sometime, and that in normal situation I do not have any error detected. I think there is a problem about synchronisation between .js files...
2010 Jun 30
0
drb problem? ringy-dingy won't answer...
...class ScriptWorker attr_accessor :script_id attr_accessor :run_id attr_accessor :distrib def initialize( script_id, run_id, distrib = true ) self.script_id = script_id self.run_id = run_id self.distrib = distrib @myLog = '''' end def perform myScript = Script.find(script_id) # left out setting of variables used below... require "#{myRoot}/script/#{myScript.name}" fullScript = Object.const_get(myClass).new( myScript, myRun, runenv, myURI, myRoot ) if self.distrib require ''rinda/ring'' DRb.star...
2012 Jun 28
2
Execute a shell script residing in puppet master
I''m a newbie to puppet and have been trying to execute a shell script residing in puppet master machine in a puppet agent, with no luck so far. Would appreciate any ideas on how to do this. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from
2012 Aug 10
1
question about windows Rgui.exe startup
...ell I have yet to find a solution to my problem. I am on a Windows platform. So what I am trying to do is have R read in a binary file on startup from the Windows system command line and startup Rgui.exe with these options without having to change Rprofile.site. I have written a script called myscript.r which allows R to read in the binary files and load my objects. I would like to load up those object from binary format "on startup" into R(interactive) like so: <windows key + r> C:\Program Files\R\R-2.15.0\bin\x64\Rgui.exe < "C:\Users\Ryan\Desktop\myscript.r" bu...
2003 May 18
1
echo = FALSE does not work
Hello, everybody, I am running R BATCH --no-save myscript.R myscript.out myscrypt.out contains the ouput I want to see there, along with all the commands executed by the script. I found in the help files, that writing echo=FALSE in the beginning of myscrypt.out should suppress printing of the commands, but it does not. Can you help me , please ? Than...
2001 Oct 08
1
Yet another batch mode question
...ks in advance, I know you can start R with either: 1. R CMD BATCH myfile.R or 2. R < myfile.R My question is this: what if I want multiple input files and/or command line arguments. For example, under unix you can run a script command (in a shell language, perl, or python) like: python myScript.py or better yet, if you have things set up right, you can place a #!/usr/bin/python line at the beginning of the file and then just type (at the shell command line): ./myScript.py Now, if I wanted to specify a file to work with and a method to use, I would just do: ./myScript.py file1 method1...
2004 Jun 07
2
(low level) profiling of code
...77 -O2 -g -pg -march=k8 -msse2 -m64 Interfaces supported: X11, tcltk External libraries: readline Additional capabilities: PNG, JPEG Options enabled: R profiling Recommended packages: no I then tried running /path/to/R-patched/bin/R CMD BATCH -q -slave myscript.R where inside myscript.R is call to R functions that calls .C(). However, this does not produce the gmon.out file. Can anyone tell me what I'm missing? Any help much appreciated! Best, Andy Andy Liaw, PhD Biometrics Research PO Box 2000, RY33-300 Merck Research Labs R...
2006 Aug 08
8
executing external code
I''m trying to run some non-ruby code in my rails app and i''m not sure how to do this. The code i have would take a really long time to port to ruby and so i''d rather run it as is (its php). What i would like to have happen is that the code can be invoked as an ajax call. And just return some data in JSON. I keep running into a routing failure by actioncontroller and