siotp/sisr1/40-bash/crsamba2.sh
2022-04-05 10:24:41 +02:00

23 lines
268 B
Bash
Executable File

#!/bin/bash
#crsamba2
#set -e
#set -u
fich=$1
if [[ $# -ne 1 ]] ; then
echo "usage : $0 <fichier>"
exit 1
fi
if [[ ! -r "${fich}" ]] ; then
echo "$0 : Erreur d'ouverture du fichier ${fich}"
exit 2
fi
while read ligne
do
echo "${ligne}"
done < $fich