For each filename argument print exactly one line (do not rename anything):
- has a
.→# <f> already has an extension - no
#!first line →# <f> does not have a #! line #!line has none ofpython/perl/sh→# <f> no extension for #! line- the target
<f><ext>already exists →# <f><ext> already exists - otherwise →
mv <f> <f><ext>(.py/.pl/.shfrompython/perl/shin the#!line).
POSIX shell only (#!/bin/dash); standard UNIX filters; no awk, Perl, C or Python. From COMP2041/9044 21T2 Final.