Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ipython shell awk : Escaping "$" sign

I am figuring out the Ipython shell support. Its seems awk doesn't work i.e following command

!ls -l | awk '{print $1}' 

just prints "1".

How do I pass the "$" sign correctly to shell. I am using zsh.

like image 905
Sandeep Avatar asked Aug 27 '10 16:08

Sandeep


1 Answers

Two dollar signs give you a literal dollar sign, so try:

!ls -l | awk '{print $$1}'
like image 60
schot Avatar answered Sep 20 '22 22:09

schot