#!/usr/bin/env python # coding: utf-8 # In[32]: get_ipython().run_cell_magic('writefile', 'test.txt', 'foo bar\nbarman\nbaz\n') # In[33]: get_ipython().system('grep bar test.txt') # In[34]: get_ipython().run_line_magic('alias', 'grep grep --color=always') # In[35]: grep bar test.txt