Run bash scripts

# should exist
Sys.which('bash')
Sys.which('sh')

Does bash work?

echo hello world
echo 'a b c' | sed 's/ /\|/g'
# number of lines
awk 'END{print NR;}' 027-engine-bash.Rmd

How about sh?

# run wc on all engine examples
ls | grep engine | head -n8 | xargs wc


Try the parsermd package in your browser

Any scripts or data that you put into this service are public.

parsermd documentation built on May 20, 2021, 5:08 p.m.