How can I run the equivalent of a cat
for appending a file to another, from within Julia? The run(pipeline(
cat file.txt, stdout="out.txt"))
option overwrites the output file.
shell> cat foo.txt
hi
julia> open("foo.txt", "a") do io
run(pipeline(`ls -la`, stdout=io))
end
Process(`ls -la`, ProcessExited(0))
shell> cat foo.txt
hi
total 568
drwxr-xr-x 13 pfitzseb pfitzseb 4096 Feb 16 15:46 .
drwxr-xr-x 127 pfitzseb pfitzseb 4096 Dec 11 12:40 ..
-rw-r--r-- 1 pfitzseb pfitzseb 71659 Feb 14 15:04 CHANGELOG.md
Thanks!
Leandro Martínez has marked this topic as resolved.
Last updated: Nov 06 2024 at 04:40 UTC