The following 25 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

and   base   basename   bash   echo   fastq   file   files   gz   in   ip   method   modern   More   name   placing   quotes   shell   spaces   survive   the   twist   variable   will   with  

Clear message

bash shell

method 1

# get the base name of a file
f=twist_ip.fastq.gz
base=`basename $f .fastq.gz`
echo $base

method 2

More modern, and placing the file variable in quotes will survive files with spaces in the name.

# the modern way
f=twist_ip.fastq.gz
base=$(basename "$f" .fastq.gz)
echo $base

Bash (last edited 2015-09-14 21:02:43 by ChrisSeidel)