I am working in Google Colab and am trying to save a filename such as fileName.mp3
as a variable. I then hope to use it in a bash/shell script command several cells later. I’ve done:
! input_file="fileName.mp3"
and
%%bash
input_file="fileName.mp3"
and
import os
os.environ['input_file'] = "fileName.mp3"
but none of these seem to work when I try to call ! echo $input_file
later. What is a way I can save a variable into the environment for usage later?