Quantcast
Channel: Recent Gists from vsoch
Viewing all articles
Browse latest Browse all 30

Saving output to a file and printing to terminal

$
0
0
output_file.md

This is executing a command to the container to list at the root (/) and then redirect stdout and stderr to "out.txt"

$ singularity exec salad_latest.sif ls / 2>&1| tee out.txt
bin
code
dev
environment
etc
home
lib
media
mnt
proc
root
run
sbin
singularity
srv
sys
tmp
usr
var

And confirm that's what is put there:

vanessa@vanessa-ThinkPad-T460s:/tmp$ cat out.txt 
bin
code
dev
environment
etc
home
lib
media
mnt
proc
root
run
sbin
singularity
srv
sys
tmp
usr
var

Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>