2
votes

I knew the wizardry tag would ensnare the myriad of Magic the Gathering fan programmers who pull all the strings in the Julia language. I've been told that running command line arguments in Julia via run() is asynchronous meaning one command could start potentially before the previous finishes. I am assuming the aforementioned to be true, so if that's not the case feel free to lash out. I want to run a series of commands (similar to the following set) but do not want the second to begin before the first has been completed:

     run(`cat $fx` |> `grep $datef` >> "$newfile")

     run(`cat $gx` |> `grep $dateg` >> "$newfile") 

I'd imagine I could put a sleep command between the two or possibly use readall() (which I'm also assuming would have to wait in order to print to standard out) but was wondering if there was something more elegant. Sincere thanks for considering this.

1
"I've been told that running command line arguments in Julia via run() is asynchronous" Smite thee troll with a dastardly spell for speaking these untruths. 8-) - rickhg12hs

1 Answers

3
votes

They're synchronous.

run(`sleep 2`)