= elvish == I/O redirection echo hi 2>&1 1>/tmp/log # use stdout for stderr as well echo hi >/tmp/log 2>&1 # write command output to file == run command per file ls | each {|x| echo $x; cat $x } each {|f| echo "→" $f } [ (e:ls -1 .) ] == swap file extension === attach different file extension to all files matching regex "owa.pdf" use str use re ls | each {|f| if (re:match ".*owa.pdf" $f) { mv $f (str:join "" [(str:trim-suffix $f "owa.pdf") "owa_calendar_export.pdf"]); } } === filepath w/o file extension fn wo-filext {|f| if (str:contains $f ".") { var i = (str:last-index $f "."); put $f[0..$i] } else { put $f } } == iterate over a set VARIANTS=["mceliece348864" "mceliece460896" "mceliece6688128" "mceliece6960119" "mceliece8192128"] each {|f| cargo test --features $f } $VARIANTS