cmds=open("cmds", "w")
for i in 1:5
cmd= "echo hello
echo byebye"
println(cmd)
#write(cmds, join(cmd,"\t","\n"))
write(cmds, cmd)
end
close(cmds) #tick appears but the existing file is still empty
Your code snippet works for me. My guess is that the file you created with touch is not in your julia working directory. Note that open("filename", "w") will overwrite the contents of “filename” or create that file if it doesn’t exist. So if your julia working directory is not the directory where you ran touch cmds, then when you run `cmds = open(“cmds”, “w”) in julia it’s actually creating a new file called cmds.