#!/bin/bash
# combine the details of 'ls' and 'file' in a single line
if [ "$1" == "-l" ]
	then
		shift
		long_opt="-l"
	else
		long_opt=""
fi
if [ "$1" == "" ]
	then the_arg="`pwd`"
	else the_arg="$1"
fi
the_ls=`ls -Flad $the_arg`
the_file=`file $the_arg`
the_type=`echo "$the_file" | sed 's/^.*:/:/'`
echo $the_ls$the_type
if [ "$long_opt" == "-l" ]
	then
		stat "$the_arg" | tail -n +2
fi


syntax highlighted by Code2HTML, v. 0.9.1