mirror of
https://github.com/gladstone-institutes/Bioinformatics-Workshops.git
synced 2025-11-30 09:45:43 -08:00
add part 2
This commit is contained in:
parent
d6aa2d5bec
commit
47920f7348
6 changed files with 1594 additions and 1527 deletions
11
intro-unix-command-line/materials/example_script.sh
Normal file
11
intro-unix-command-line/materials/example_script.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This is a comment. Comments are ignored by the shell.
|
||||
|
||||
# $1 is the first argument passed to the script
|
||||
echo "Counting the genes in $1"
|
||||
|
||||
# count the unique genes in the file
|
||||
u_genes=$(gunzip -c $1 | cut -f 1 | sort -u | wc -l)
|
||||
|
||||
echo "There are $u_genes unique genes in $1"
|
||||
Loading…
Add table
Add a link
Reference in a new issue