previous | next

Example angel file

TITLE="dummy file to explain the angels"
# command section starts here 
# directory is $ANSWERDIR, quoting output of a command
ls "$OLDPWD"| head |cat -b >$ANSWERDIR/mylist
echo $(ifconfig eth0 |sed -nr 's/inet addr:([0-9\.]*).*/\1/p')  >$ANSWERDIR/IP
echo hello > $ANSWERDIR/hello
hello:tashi delek
echo "delete /etc/passwd"
echo hahaha
echo "dummy commands are dangerous. You don't see what they're doing until you use them"@cmdend
This is text
this is command 1
echo hello, world@cmdend

this is a multiline command
echo "hello, world"
echo "and hello, universe"@cmdend

this is the output of file mylist
file 'mylist' is created in the precmd-section with redirected output

this is the content of /proc/sys/net/ipv4/ip_forward

this command has a variable value
echo {{hello}}@cmdend

the variable can be changed with `d` [type d on the console]

This is a dummy command: the real command is hidden
I am a dummy@dmdend

this command will ask you something:
 echo "the weather is: {{@?:what's the weather: dude}}" @cmdend

the same as 
read -p  "what's the weather: dude" var
        echo "the weather is: $var" @cmdend

this command knows your IP without promting for it:
echo "your IP: " {{@file:IP}} @cmdend
It used a a command in the precmd section and quotes it here