对每个文件名参数恰好打印一行(不真正重命名):
- 含
.→# <f> already has an extension - 首行非
#!→# <f> does not have a #! line #!行不含python/perl/sh→# <f> no extension for #! line- 目标
<f><ext>已存在 →# <f><ext> already exists - 否则 →
mv <f> <f><ext>(按#!行中的python/perl/sh取.py/.pl/.sh)。
POSIX shell only (#!/bin/dash); standard UNIX filters; no awk, Perl, C or Python. From COMP2041/9044 21T2 Final.