Splitting Long Drake Steps Across Multiple Lines

25 views
Skip to first unread message

Michael Smith

unread,
Oct 13, 2014, 8:40:41 AM10/13/14
to drake-w...@googlegroups.com
In a shell script, I can wrap long commands into several lines by adding `\` at the line end. Is there something similar in Drake? (I tried `\`, but got an error.)

I'm asking since, for example, if I have a lot of data files in a given step, it would be nice to be able to split them across several lines, e.g. something like this: 

outfile <- \
  infile0 \
  infile1 
    myscript.sh $INPUT0 $INPUT1 $OUTPUT

Thanks,
M

Michael Smith

unread,
Oct 17, 2014, 9:12:49 PM10/17/14
to drake-w...@googlegroups.com
To answer my own question: 

outfile <- infile1,
             infile2,
             infile3
    myscript.sh $INPUT0 $INPUT1 $INPUT2 $OUTPUT

By the way, the more I use Drake, the more I like it (and I liked it from the beginning as well). 

Thank you guys for providing such an awesome tool! 

Aaron Crow

unread,
Oct 22, 2014, 5:39:23 PM10/22/14
to Michael Smith, drake-w...@googlegroups.com
Hi Michael, currently no support for this. I've opened a ticket, but this may be treated as very low priority.

--
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-workflo...@googlegroups.com.
Visit this group at http://groups.google.com/group/drake-workflow.
For more options, visit https://groups.google.com/d/optout.

aa...@factual.com

unread,
Oct 23, 2014, 6:57:44 PM10/23/14
to drake-w...@googlegroups.com
Michael, thanks for the kind words. Also, totally my bad, I didn't realize the comma syntax works currently. FWIW we're tinkering with supporting \ as well:
https://github.com/Factual/drake/issues/147

Michael Smith

unread,
Oct 24, 2014, 5:52:46 AM10/24/14
to aa...@factual.com, drake-w...@googlegroups.com
Great, thanks for the quick fix! I think the backslash can be quite
useful in other cases as well.
Reply all
Reply to author
Forward
0 new messages