Top tips and hidden gems

I just learned a new one. Fish function file.all. See here file.all — FLAC3D 7.0 documentation (itascacg.com)

You can dump a list to a file with a single line. For example, if you have a list of strings called lines, you can just do this:
[file.all(‘test.txt’,‘text’) = lines]

Even better, you can use splitting to easily dump out data. For example, if you want to dump all gridpoint pore pressures to a file, you can do this:
[file.all(‘test.txt’,‘text’) = gp.pp(::gp.list)]

6 Likes