GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
print_help.sh
Go to the documentation of this file.
1 #!/usr/bin/env bash
2 # This script is meant to be called with a string to grep with; however
3 # If no string is provided, the program should still work
4 grep_string=$1
5 echo $grep_string
6 
7 # Find the length of the helpfile, subtract the license (37 lines)
8 num_lines=$(cat src/helpfile | wc -l)
9 license_lines=3
10 print_lines=$((num_lines-license_lines))
11 
12 # print help
13 if [ -n "$grep_string" ]; then
14  tail src/helpfile -n $print_lines | grep $grep_string
15 else
16  tail src/helpfile -n $print_lines
17 fi
18