#!/bin/rc
# simple rc test script

# list variable
files = (*.c)

# loop over list
for(f in $files){
    echo compiling $f
    cc -c $f
}

# function definition
fn greet {
    echo hello $1
}

greet world

# command substitution
today = `{date}
echo today is $today

# quoting example
msg = 'it''s working'
echo $msg

# redirection
echo done >done.log
