--- nfo/bash/ff 2004/10/15 10:51:04 1.1 +++ nfo/bash/ff 2004/11/07 02:02:01 1.3 @@ -3,7 +3,7 @@ N='ff' C='rabit@netfrag.org, 08.10.2004' F="$N - Follow file" -I='$Id: ff,v 1.1 2004/10/15 10:51:04 rabit Exp $' +I='$Id: ff,v 1.3 2004/11/07 02:02:01 joko Exp $' #--------------------------------------------------------------------- # If unset, set the per-user file list to a good default: @@ -59,6 +59,18 @@ $E 'Done.' exit ;; +(-i) + iselect=`which iselect` + if [ -z $iselect ]; then + echo "ERROR: iselect is not installed" + exit + fi + sel=`cat $FFFILES | $iselect -a -c -n "Select file to tail"` + if [ ! -z $sel ]; then + tail -f $sel + fi + exit + ;; (?*) CheckFileList; [ -z $FileListExists ] && exit CountFiles @@ -82,6 +94,8 @@ $E ' Tail and follow the file with index '$B1''$B0'.' $E ' '$B1$N' -a '$B0 $E " Add a file to '"$B1$FFFILES$B0"'. "$B1''$B0' must exist.' +$E " $B1$N -i$B0" +$E " Interactively choose from list of files in '"$B1$FFFILES$B0"'." $E ' '$B1$N' [-h|--help]'$B0 $E ' Get this brief help.' $E "The variable '${B1}FFFILES$B0' set overrides the file list default file name."