[ubuntu] Using variables defined in python and other languages with jupyter notebook in bash
OS linux
Published : 2021-12-23   Lastmod : 2021-12-26

environment

uname -a
Linux 4.19.0-18-cloud-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux

Take over variables

To share a directory name between python and bash, you can enclose it in {}.

outdir = './out/'

Create a directory in bash.

! mkdir -p {outdir}
! echo {outdir}
./out/

The variable was retrieved. Congratulations!

Related Articles