Writing Script

From DeepSense Docs
Revision as of 20:02, 3 December 2020 by Bgeetika (talk | contribs) (Created page with "Bash scripts are used to put multiple commands that you run on command line at one place. Anything you put into bash scripts will work exactly same as they work on command lin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Bash scripts are used to put multiple commands that you run on command line at one place. Anything you put into bash scripts will work exactly same as they work on command line. Bash is available by default on Linux and macOS operating systems ,however , for windows you can install Git Bash to work with bash scripts. For creating the bash scripts, save the file with .sh extension. To run this bash script, use keyword bash followed by the name of the file

For example : if the File Name is example.sh, run this file by writing “bash example.sh”

Writing Bash scripts

In bash scripts, you can put all the commands which you feel are required to run every time when you start with your project. This will save your time.

For example example.sh
#!/bin/bash
source /opt/anaconda2/etc/profile.d/conda.sh
conda activate
bsub -Is -gpu - bash
jupyter notebook --no-browser --ip=0.0.0.0

Above script will execute all the commands