I really don't like Splunk documentation. Why is it so hard to find out how to do a certain action? So this is a cheatsheet that I constructed to help me quickly gain knowledge that I need.
index="my_log"
| #!/bin/bash | |
| function main() { | |
| local var=`echo 'this' 'is' \ | |
| 'a multiline' 'string'` | |
| # Expected Output: "this is a multiline string" | |
| echo "$var" | |
| } |
| #!/bin/bash | |
| function main() { | |
| case $1 in | |
| a) | |
| echo "You typed in 'a'!" | |
| ;; | |
| b | 'd') | |
| # This fallthrough operator is introduced in Bash v4. |
| from cmds.base import FlaskView as CmdFlaskView | |
| class FlaskView(CmdFlaskView): | |
| route_prefix = '/api' | |
| @classmethod | |
| def on_socket_event(cls, event_name): | |
| """Registers a listener for websocket events. | |
| #!/bin/python3.6 | |
| import email | |
| import logging | |
| import os | |
| import select | |
| from io import StringIO | |
| from socketserver import StreamRequestHandler | |
| from socketserver import TCPServer | |
| from socketserver import ThreadingMixIn |
| @fuzz_lightyear.register_factory('userID') | |
| def create_biz_user_id(): | |
| return do_some_magic_to_create_business() |