Skip to content
Discussion options

You must be logged in to vote

You can install git with git bash (usually installed by default with git). This would allow your notebooks to access bash and run the commands using it.

Alternatively, you can use %%cmd instead of %%bash. Note that this would require changing the bash commands in the notebook to cmd commands. For instance -

%%bash
if [[ ! -d "lithium_ion" ]]; then
echo "Directory lithium_ion does not exist."
fi

would change to -

%%cmd
@echo off
if exist "lithium_ion" (
  echo Directory lithium_ion exists 
) else (
  echo Directory lithium_ion does not exist
)

or something similar.

I have pushed a notebook identical to the original one, but swapping the bash commands with cmd commands on my fork here - h…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@Tangzl922
Comment options

Comment options

You must be logged in to vote
3 replies
@Tangzl922
Comment options

@Nithin3297
Comment options

@Saransh-cpp
Comment options

Answer selected by Tangzl922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #2088 on June 07, 2022 14:33.