/usr/bin/Fhelp is in ferret-vis 6.9.3-4build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #! /bin/sh
#! *sh* 10/91
#! Fhelp
#! enter the Ferret Users Guide at the indicated line number
#! If no line number is given then coach on usage
. /usr/share/ferret-vis/bin/ferret_paths
# no argument given: explain the ropes
if [ $# -eq 0 ]; then
echo ' '
echo ' *** Fhelp - Interactive help for FERRET ***'
echo ' '
echo ' Fhelp enters the FERRET Users Guide at a given line number'
echo ' or at the first occurrence of a given string'
echo ' '
echo ' Correct usage is: Fhelp line_number'
echo ' or: Fhelp string'
echo ' For example: Fhelp "getting started"'
echo ' '
echo ' When reading the Users Guide use standard "more" commands:'
echo ' ? = help b = back 1 page CR = next line space = next page'
echo ' '
echo ' '
echo ' Also available: Fapropos'
echo ' Fapropos scans the FERRET Users Guide for a character string'
echo ' and reports the lines where it occurs'
echo ' '
echo ' Correct usage is: Fapropos string'
echo ' '
exit
fi
# too many arguments: explain the syntax
if [ $# -gt 1 ]; then
echo " "
echo " *** Syntax error in command entered ***"
echo " "
echo " Correct usage is: Fhelp line_number"
echo " "
echo ' '
echo ' Use Fapropos to scan the FERRET Users Guide for a character string'
echo ' and determine the lines where it occurs'
echo ' '
echo ' Correct usage is: Fapropos string'
exit
fi
# did user enter a line number or a string
if echo $1 | grep -E -q '^[0-9]+$' ; then
# line number - enter the FERRET manual 2 lines before the requested line
startpos=`echo "$1 - 2" | bc`
more -d +${startpos} ${FER_DIR}/doc/ferret_users_guide.txt
else
# string: use grep for case-insensitive search and start 2 lines before the first occurence
startpos=`grep -in "$1" ${FER_DIR}/doc/ferret_users_guide.txt | head -1 | sed 's/^\([0-9]*\):.*$/\1/'`
if [ -n "${startpos}" ]; then
startpos=`echo "${startpos} - 2" | bc`
more -d +${startpos} ${FER_DIR}/doc/ferret_users_guide.txt
fi
fi
|