syntax

There is 2 options to make “robo” speak, either by direct input or by making use of the scripting abilities of your shell.

1. Direct Input:

Example:
So you want to make robo say: “Hello World”.  Just type:

robo hello world

robo will say:

hello world

2. Scripted input

“robo” can deal with code input as well. This fact makes robo a potentially powerful tool, because it allows to create dynamic output and can be used in shell scripts. Remember: The `backticks` will do a command substitution and deliver the outcome as argument to robo.

Example:
You want to make robo say the current kernel version:

robo `uname -r`

robo will say:

2.6.28-15-generic

The two `backticks` will run the command inbetween them first. Once the output is generated, this output will be delivered to robo as arguments to say.

Example:
In a script you want to adress the user (login name: nancy) with her login name:

robo Hello $USER

robo will say:

Hello Nancy

Example:
Want robo to read the most recent entry of /var/log/messages ?

robo `tail -n1 /var/log/messages`

Well, you better write a script to filter the output a bit. Consider to share in scripts.

Advertisements

Post a Comment

Required fields are marked *

*
*

%d bloggers like this: