Hi all,
How do I save a iex session (input and output) as a plain text file?
The BSD “script” command (make a typescript of terminal session) creates garbage in the file.
script [-adkpqr] [-F pipe] [-t time] [file [command ...]]
Original session:
riazor:~ fun2src$ script hello.txt
Script started, output file is hello.txt
bash-3.2$ iex
Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> "hello" <> "world"
"helloworld"
iex(2)>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
^Cbash-3.2$ exit
Script done, output file is hello.txt
riazor:~ fun2src$
Output file content:
Script started on Tue Jul 9 15:42:02 2019
ESC[?1034hbash-3.2$ iex
Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> "hello" <> "world"
ESC[33mESC[32m"helloworld"ESC[0mESC[33mESC[0m
iex(2)>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
^Cbash-3.2$ exit
Script done on Tue Jul 9 15:42:40 2019
hello.txt (END)
Thanks in advance for any help you are able to provide.