HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to write a bash script

162,310 views November 8, 2017 8:52

Watch on YouTube
ChannelOMGenomics

Description from the creator

On Mac or Linux, how to make a script/pipeline on the command-line in bash.

Blog post: omgenomics.com/blog/writing-bash-script
Interactive tutorial: sandbox.bio/tutorials/bash-script/?yt=bash-scri…


Code:
#!/usr/bin/env bash
NAME=${1?Error: no name given}
NAME2=${2:-friend}
echo "HELLO! $NAME and $NAME2"

Run as:
./myscript Tom
or
./myscript Tom Jerry


See what we've been up to at omgenomics.com


Correction:
02:40 To get out of less, just press the "q" key.

About this tutorial

OMGenomics published this 8:52 video tutorial on November 8, 2017. It has been watched 162,310 times on YouTube.

Channel
OMGenomics
Duration
8:52
Published
November 8, 2017
Views
162,310
Likes
3,749

Tags

Share

This tutorial in other languages