35-script/

This commit is contained in:
Raphanaud
2021-09-30 15:45:04 +02:00
parent f84127bcc7
commit 6fbf265e6e
14 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -o errexit
set -o nounset
if [[ $# != 1 ]]; then
echo "usage : $0 <fichier>"
exit 1
fi
fich="$1"
if ! [[ -r "${fich}" ]]; then
echo "$0 : erreur ouverture fichier ${fich}"
exit 2
fi
while read ligne
do
echo "${ligne}"
done < "${fich}"
exit 0