Hi Fernando
$ pip-3.4 list |grep jup jupyter (1.0.0) jupyter-client (4.2.2) jupyter-console (4.1.1) jupyter-core (4.1.0) Thanks Andy From: <[email protected]> on behalf of Fernando Perez <[email protected]> Reply-To: <[email protected]> Date: Monday, July 11, 2016 at 6:28 PM To: Project Jupyter <[email protected]> Subject: Re: [jupyter] trouble using local variable in shell scripts > Mmh, what version are you using? We don't expand the $2 inside quotes, the > following similar code works fine for me in the notebook (not trying yours as > I don't have the aws cli installed): > > user = 'root' > !ps aux | grep $user | awk '{print $2}' > > > On Mon, Jul 11, 2016 at 4:55 PM, Andy Davidson <[email protected]> > wrote: >> >> >> The following will run a shell script and store the results in a juypter >> variable ŒdataSet¹ >> >> dataSets = !aws s3 ls >> s3://com.pws.twitter/json/StreamingKafkaGnipCollector/gnip/ |grep PRE | awk >> -F'PRE' '{print $2}' >> >> >> If I try and define a variable that represents the URL the command will fail. >> >> baseURL="s3://com.pws.twitter/json/StreamingKafkaGnipCollector/gnip/" >> !echo $baseURL >> dataSets = !aws s3 ls $baseURL | grep PRE | awk -F'PRE' '{print $2}¹ >> >> The problem is with my awk command. I think maybe the note book is trying to >> expand $2. >> >> Any idea how I can fix this? >> >> Thanks >> >> Andy >> -- >> You received this message because you are subscribed to the Google Groups >> "Project Jupyter" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/D3A97FFB.40D33%25Andy%40SantaCruzIn >> tegration.com >> <https://groups.google.com/d/msgid/jupyter/D3A97FFB.40D33%25Andy%40SantaCruzI >> ntegration.com?utm_medium=email&utm_source=footer> . >> For more options, visit https://groups.google.com/d/optout. > > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/CAHAreOoTgjR2X%2BZdJnOOsB9DsBR8ndbhv > hCFNRRJxVcxSV-y5Q%40mail.gmail.com > <https://groups.google.com/d/msgid/jupyter/CAHAreOoTgjR2X%2BZdJnOOsB9DsBR8ndbh > vhCFNRRJxVcxSV-y5Q%40mail.gmail.com?utm_medium=email&utm_source=footer> . > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/D3ABD822.41000%25Andy%40SantaCruzIntegration.com. For more options, visit https://groups.google.com/d/optout.
