Sending text to a Terminal or iTerm2 window?
You can use the Applescript keystroke command.

tell application "iTerm" to activate
delay 0.5
tell application "System Events"
    keystroke "a"
    delay 0.2
    keystroke "b"
    delay 0.2
    keystroke space
    delay 0.2    
    keystroke "c" using control down
end tell