Issue
I'm trying to invoke the gsutil
command from a cell in a Jupyter notebook, using the bash cell magic %%bash
, as such:
%%bash
gsutil
However I am receiving the following output:
bash: line 1: gsutil: command not found
On the other hand, using the exclamation mark syntax gives me the expected result:
!gsutil
Gives...
Usage: gsutil [-D] [-DD] [-h header]... [-m] [-o] [-q] [command [opts...] args...]
Available commands:
acl Get, set, or change bucket and/or object ACLs
cat Concatenate object content to stdout......
The !
syntax doesn't support multi-line commands, and even if it did, as I am collaborating with others, I need the %%bash
syntax to work for me.
Can anyone enlighten me as to what the reason behind this is and how I can go about solving it?
Thanks in advance.
Solution
I got around this by using the %%cmd
magic instead, which I was unaware of. I'll still have to do some tweaking of the bash commands as there are some slight inconsistencies, but still better than nothing.
Answered By - quantum285
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.