Use environment variable instead of grep