23 lines
244 B
Bash
Executable File
23 lines
244 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#set -e
|
|
#set -u
|
|
|
|
if [[ $# -ne 1 ]] ; then
|
|
echo "usage : $0 <fichier>"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -r "$1" ]] ; then
|
|
echo "$0 : erreur ouverture ${fich}"
|
|
exit 2
|
|
fi
|
|
|
|
|
|
|
|
fich=$1
|
|
while read ligne
|
|
do
|
|
echo "${ligne}"|cut -d: -f1
|
|
done < $fich
|