Interpolation

String interpolation with the $ operator is allowed in a command object, like this:

  file = "file1.txt" 
cmd = `cat $file` # equivalent to `cat file1.txt` 
run(cmd) #> prints the contents of file1.txt 

This is very similar to the string interpolation with $ in strings (refer to the Strings section in Chapter 2, Variables, Types, and Operations).

Get Julia 1.0 Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.