def get_runsvdir_dir_from_cmdline(cmdline):
    # TODO - unittest this
    for i, arg in enumerate(cmdline):
        # Skip the process name
        if i == 0:
            continue

        # Skip the -P, -H flags
        if arg in ['-P', '-H']:
            continue

        return arg
    return None
Create a search job.
dataset/ETHPy150Open facebook/sparts/sparts/runit.py/get_runsvdir_dir_from_cmdline--crossover with--dataset/ETHPy150Open splunk/splunk-sdk-python/examples/job.py/Program.create