/usr/bin/Fgo 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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | #! /bin/sh
# Fgo go_file_template
# determine if files matching go_file_template are currently on-line by
# searching the paths in FER_GO
. /usr/share/ferret-vis/bin/ferret_paths
print_usage() {
echo " "
echo "Usage:"
echo " Fgo [ -help | -d | -l | -more ] go_file_template"
echo " "
echo "where options include: "
echo " -help print this help message and exit"
echo " -d generate filename list with descriptions (default)"
echo " -l generate long listing without descriptions"
echo " -more display files matching the given template using more"
echo " "
echo "These options precede the file template. Files matching the"
echo "given template are then listed, or displayed using more if"
echo "the -more option is used. All options are mutually exclusive."
echo "To see all of the Go tools/journal files available, enter: "
echo " Fgo '*'"
echo "It is important to have the quotes around any asterisks"
echo "in the file template."
echo " "
}
#check for proper amount of args. One arg is the filename or template.
if [ $# -le 0 ] || [ $# -gt 2 ]; then
print_usage
exit 1
fi
# check for help flag
if echo "$1" | grep -q '^-h' ; then
print_usage
exit 1
fi
if [ $# -eq 1 ]; then
option=""
template="$1"
else
option="$1"
template="$2"
fi
# check to see if file contains .jnl
if ! echo "${template}" | grep -q '\.jnl' ; then
template="${template}*.jnl"
fi
found=0
for subdir in ${FER_GO}; do
filelist=`cd "${subdir}" ; find * -maxdepth 0 -type f -name \*"${template}"\* -print`
if [ -n "${filelist}" ]; then
echo "* * * * * * * * in ${subdir}"
if [ -z "${option}" ] || [ "${option}" = "-d" ]; then
for gofile in ${filelist} ; do
descript=`cd ${subdir} ; grep -i ' description: ' ${gofile} | sed -e 's/\! [dD][eE][sS][cC][rR][iI][pP][tT][iI][oO][nN]: //'`
echo "${gofile}: ${descript}"
done
elif [ "${option}" = "-l" ]; then
( cd "${subdir}" ; /bin/ls -l ${filelist} )
elif [ "${option}" = "-m" ] || [ "${option}" = "-more" ]; then
( cd "${subdir}" ; more ${filelist} )
else
echo "Invalid option: ${option}"
print_usage
exit 1
fi
echo " "
found=1
fi
done
if [ $found -eq 0 ]; then
echo "No files matching ${template} were found"
fi
|