$OUTPUT and $INPUT don't work for me in simple tutorial

29 views
Skip to first unread message

Catherine Dalzell

unread,
Aug 15, 2016, 2:21:54 PM8/15/16
to drake-workflow
I am just starting out with Drake and tried the basic tutorial.  My drakefile is:


; we only like lines with lower case i


out.csv <- in.csv 
  grep i $INPUT > $OUTPUT


When i do drake -w mydrakefile, I get an error:

Using drip to start up JVM...
The following steps will be run, in order:
  1: /home/placidia/Documents/DS at CL/usingDrake/out.csv <- /home/placidia/Documents/DS at CL/usingDrake/in.csv [missing output]
Confirm? [y/n] y
Running 1 steps with concurrence of 1...

--- 0. Running (missing output): /home/placidia/Documents/DS at CL/usingDrake/out.csv <- /home/placidia/Documents/DS at CL/usingDrake/in.csv
/home/placidia/Documents/DS at CL/usingDrake/.drake/shell-4b25e0767043bf75754bc8664458b407.bat: line 1: $OUTPUT: ambiguous redirect
Done (0 steps run).


If I do:


out.csv <- in.csv 
  grep i in.csv > out.csv


I get the expected result. I am running Linux Mint v18 with the Bash shell. Drake is version 1.0.3.

I tried even simpler scripts, along the lines of echo $INPUT, but I got the same error. The $INPUT and $OUTPUT variables don't seem to be working as advertized.


Aaron Crow

unread,
Aug 16, 2016, 4:41:42 PM8/16/16
to Catherine Dalzell, drake-workflow
Hi Catherine,

Thanks for trying Drake!

I've not seen that error before. A little googling led me to this...

... and so i verified that adding quotes around $OUTPUT still works for me (see below example). Please try that and let us know what happens...


out.csv <- in.csv
  grep i $INPUT > "$OUTPUT"

--
You received this message because you are subscribed to the Google Groups "drake-workflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drake-workflow+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/drake-workflow.
For more options, visit https://groups.google.com/d/optout.

Catherine Dalzell

unread,
Aug 16, 2016, 9:12:05 PM8/16/16
to drake-workflow, catherine...@gmail.com
Hi Aaron,

Thanks for this! Yes, it worked. You also have to enclose $INPUT in quotes. 
To unsubscribe from this group and stop receiving emails from it, send an email to drake-workflo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages