Giter VIP home page Giter VIP logo

bash_hpc_2021's Introduction

From zero to ${0##*/}: an introduction to bash scripting and HPC

In this course, we will go from zero to advanced usage of the bash shell to master the power of a text user interface. The program consists of three parts:

  • the command line
  • bash scripting
  • running jobs on Ulysses

The first part deals with the structure and the expansions that are (or can be) performed from the command line. After introducing the most commonly used commands (e.g., cd, ls, pwd), we will practice with some text-related analysis (e.g., find files containing a string, remove duplicated entries), getting acquaintance with the pillars of text pre and post-processing.

The interactivity of the shell is essential for quick and dirty solutions. However, a more structured approach (e.g., parametrized) or more extended analysis requires a script, which is the focus of the second part. Variables, functions, loops, control flow, arrays, tab-completion, etc., are revealed, emphasizing best programming practices and performance implications.

The last part deals with efficiently using the Ulysses cluster, thanks to the acquired skills.

Syllabus

  • Basic actions: move around the file system, list files and their metadata, display content of a file, create and delete files, find files.
  • Text processing: count lines, sort entries, select specific columns, redirect output, pipes, remove duplicates, transform chars (e.g., from uppercase to lowercase), find a string in a file, substitute a pattern in a file, non-trivial usage of the gawk program.
  • Scripts: how to write and run a script, passing arguments, special parameters, expansions, printf, variables, functions, parameter substitution, read from stdin, control flow, test, interactive menus, loops, getopts, arrays, here document, run jobs in parallel, tab-completion
  • Ulysses: how to log in, .ssh, .ssh/config, move files from and to Ulysses, environment modules, queueing systems (slurm), submit jobs.

bash_hpc_2021's People

Contributors

asartori86 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

fcaleffi

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.