NBash
15 строк · 271.0 Байт
1#!/bin/bash
2
3for filename in "$@"
4do
5echo "Содержимое файла $filename"
6echo "---------------------------------"
7linecount="1"
8while IFS="\n" read line
9do
10echo "${linecount}: $line"
11linecount="$(( $linecount + 1 ))"
12done < "$filename"
13done
14
15exit 0