PROJECT: Listing the files in c:/cygwin/bin according to type. Background: There are several types of entities in a directory such as c:/cygwin/bin. There are subdirectories, symlinks, executables (recognizable by their file extension ".exe"), and text files. The text files are all scripts of various types, such as shell or perl. The type of script is indicated in the first line of the file. For example, "#!/bin/sh" is a shell file, "#!/usr/bin/perl" is a perl file, ... Task: List all possible types of files and list their members. 1) subdirectories 2) symlinks 3) .exe files 4) all other cases classify by the first line Steps: 1) List the subdirs 2) List the symlinks, and list what they point at (extract from "ls -l", for example) 3) List the .exe files that are NOT symlinks 4) Substeps: a) Extract all first lines from non-symlinks, non-dirs, non-.exe files > tmpfile b) Sort and unique tmpfile > tmpfile.srt What is going on? c) Determine the main types of scripts. d) List all files of a given script type, ignoring minor deviations in the top line.