Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!/bin/ksh
#***************************************************************************
#* Created by: Scott Brewster *
#* Date: 16-Apr-2007 *
#* Location: TBD *
#* *
#* Description *
#* ----------------------------------------------------------------------- *
#* Half an effort to create a color 'ls' script for AIX WITHOUT having to *
#* install the GNU ls (which does support color). Lots of room for *
#* improvement. *
#* *
#* Date Modified By Reason for modification *
#* ----------- ---------------- ---------------------------------------- *
#* 16-Apr-2007 Scott Brewster Created *
#* *
#***************************************************************************
#***************************************************************************
#* Check to see if any parameters were passed. If not, just list files. *
#***************************************************************************
if [[ $1 = "" || $(echo $1|cut -b1) = "/" ]]
then
ls $1
exit 0
fi
#***************************************************************************
#* Issue ls with parameters, send to a tmp file *
#* $1 is any ls parameters - ie -la *
#* $2 may be a directory other than CWD - ie /etc *
#* the grep -v is in case this is issued in home dir - we dont want to see *
#* our tmp file since it will be deleted when this script finishes. *
#***************************************************************************
ls $1 $2 |grep -v $$.tmp >> ${HOME}/$$.tmp
#***************************************************************************
#* Process the file. *
#* If dir: blue, link: light blue, char/block device: inverse blue, white *
#* socket: red, everything else: no color *
#***************************************************************************
while read LINE
do
TYPE=$(echo $LINE|cut -b1)
case $TYPE in
d) echo "\033[1;34m$LINE\033[0m" ;;
l) echo "\033[1;36m$LINE\033[0m" ;;
[cb]) echo "\033[44;37m$LINE\033[0m" ;;
s) echo "\033[0;31m$LINE\033[0m" ;;
-) if [[ $(echo $LINE|cut -b4) = "x" || \
$(echo $LINE|cut -b7) = "x" || \
$(echo $LINE|cut -b10) = "x" ]]
then
echo "\033[32m$LINE\033[0m"
else
echo "\033[0m$LINE"
fi ;;
*) echo "\033[0m$LINE" ;;
esac
done < ${HOME}/$$.tmp
#***************************************************************************
#* Clean up the tmp file *
#***************************************************************************
rm ${HOME}/$$.tmp