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
wc 027-engine-bash.Rmd


Try the parsermd package in your browser

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

parsermd documentation built on Aug. 21, 2025, 5:27 p.m.