with open('filename') as origin:
    for line in origin:
        if not 'something' in line:
            continue
try:
    print(line.split('"')[1])
except IndexError:
    print()
cat, grep и cut — переведено на python