Re: [Linuxcommand-discuss] Re: Your message to Linuxcommand-discuss awaits moderator approval
Brought to you by:
bshotts
|
From: Bruce B. <bbu...@ea...> - 2002-08-29 20:00:02
|
Alaa--- I got your rough draft and will send it back
annotated in a few days....
Just read the "case" lesson in Bill's tutorial, and
made the following crude improvement to the fe script:
(sure wish I knew how to make the output page without
using Shift + PageUp/PageDown.......[ which in a huge directory like /dev
would run off the scrollback buffer ] )
#!/bin/bash
###2.05
case $1 in
-l) XX=less ;;
-f) XX=file ;;
-z) XX=zless ;;
-ll) XX="ls -lah" ;;
-h) XX=w3m ;;
*) echo "Usage: You must use one of these options:
-l for less
-f for file
-z for zless
-ll for ls -lah
-h for w3m "
exit 1
;;
esac
while : ; do
select fname in $HOME / EXIT $(ls -aF) ; do
if [ "$fname" = EXIT ] ; then
echo "$PWD" > /home/farley931/.t2
exit; fi
if [ -f "$fname" ] ; then
echo
echo
${XX} "$fname"
echo
echo
elif [ -d "$fname" ] ; then
cd "$fname"
echo "$PWD"
break
fi
done
done
Bruce<+>
|