Git Product home page Git Product logo

bash_intro's Introduction

Bash and Scripting Tutorial for Researchers

The goal of this tutorial is to introduce researchers to bash and scripting. It is a short tutorial that shows major concepts with use cases related to research work.


Authors: Fadi Nammour , Julien N. Girard
Year: 2020
Email: [email protected], [email protected] (screen segment)

Table of Contents

  1. Introduction
  2. Basics
  3. Pipeline, pipes and filters
  4. Bash Scripts
  5. Screening
  6. Beyond the Scope
  7. Acknowledgements
  8. Resources

Launching the Tutorial

To start this tutorial, it is possible to launch it online using Binder with no installation required, or install it and start it locally using Docker as follow:

Binder

Click on the following icon to launch the tutorial Binder.

Docker

  1. Install Docker

  2. Run the following command in a terminal: docker run -p 8889:8889 -v ${PWD}:/home/jovyan/:rw -it fadinammour/bash-intro start-notebook.sh --NotebookApp.port=8889 --NotebookApp.token=''

Note 1 The number 8889 appears three times. The first occurence correspond to the port number of the local machine. The second one corresponds to the port of the docker container and the third one is the port of the Jupyter notebook. If you want to change the port numbers, the last two should be the same.

Note 2 The empty string argument '' passed to the --NotebookApp.token options shortcuts the token verification step. However it is not recommanded to be used with distant work for security reasons, in that case the option can just be erased.

  1. Open the Jupyter notebook in a browser by copying the link that appears in the terminal and pasting it to the browser. In case, the link does not work try entering the following address instead 0.0.0.0:8889.

Note 3 The number 8889 here corresponds to the port number of the local machine. In case this number is changed, it should be also be changed in the previous step.

Beyond the Scope Topics

Here is a list of functions and concepts that were not covered by this tutorial:

  • arithmetical operation
  • regular expressions
  • bash profil
  • aliases
  • shabang
  • chown
  • ssh
  • sed
  • chmod
  • functions
  • boolean operations
  • wildcards (globbing)
  • loops and conditions

For curious readers, these notions are explained in the links of the Resources section.

Acknowledgements

This work has been made easier thanks to the valuable help and assistance of Samuel Farren and François Lanusse.

Resources

This tutorial was inspired by the following:

  1. The Unix Shell lesson part of the data used in the tutorial was taken from this resource.
  2. The Missing Semester of Your CS Education
  3. How to Use Linux Screen

Additionnal material:

  1. Bash Reference Manual
  2. Bash scripting cheatsheet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.