Crate romulus[−][src]
Romulus is a text processing language similar to sed
Here is an example program which process the output of ifconfig
/^(?P<inter>[a-zA-Z0-9]+): /,/^[a-zA-Z0-9]+:/ {
/inet (?P<ip>[0-9]{1,3}(\.[0-9]{1,3}){3})/ {
print("${inter}: ${ip}")
}
/inet6 (?P<ip>[a-fA-F0-9]{0,4}(:[a-fA-F0-9]{0,4}){0,8})/ {
print("${inter}: ${ip}")
}
}
Macros
color | A macro that expands to a colored output if romulus is compiled with color support |
nl | A macro that expands to the proper line ending character sequence for operating system |
Structs
Builder | Builds an interpreter |
Interpreter | The interpreter which processes lines with a romulus program |
Functions
features | Gives a record of which features romulus was installed with |