jeroenjanssens / data-science-at-the-command-line

Data Science at the Command Line
https://datascienceatthecommandline.com
Other
3.8k stars 764 forks source link

Rio mac #17

Closed mpettis closed 10 years ago

mpettis commented 10 years ago

Sorry, messed up on original pull request and messaging -- here is my original comment, few edits: ... Two changes:

1: added triple backslash-n for newline in cat statement in callR function for escaping newline in bash script, otherwise did not work on bash in my mac. Please test to see if it works for other bash as well (like Linux), but it should. Not sure why it worked on bash in Linux, unless I've not kept up on escaping sequences.

2: Changed creation of OUT and ERR tempfiles. As currently made, would create a file, and then append either .png or .err to the FILENAME in the bash script, and then would write to the filenames with the new suffixes. But the mktemp command makes the un-suffixed files as well, and they never get cleaned up in the temp directory using the trap call. Appending the .png and .err suffix in the inner mktemp command call fixes that (again, tested on a Mac).

mpettis commented 10 years ago

Err... I need to retract this pull request, as the mktemp command didn't quite pan out like I had thought. Will resubmit a better one soon.