cat grep unix like python script