Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 491 Bytes

027-engine-bash.md

File metadata and controls

49 lines (36 loc) · 491 Bytes

Run bash scripts

# should exist
Sys.which("bash")
##            bash 
## "/usr/bin/bash"
Sys.which("sh")
##            sh 
## "/usr/bin/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
## hello world
## a|b|c
## 23

How about sh?

# run wc on all engine examples
wc 027-engine-bash.Rmd
##  23  53 347 027-engine-bash.Rmd