Je ne sais pas pourquoi la dernière ligne ne coupe pas le "du script:de script Bash pour lire un fichier
#!/bin/bash
FILENAME=$1
while read line
do
cut -d '"' -f2
echo $line
done < $FILENAME
$ cat file
"1" test
"2" test
"3" test
"4" test
"5" test
Si je lance ce script avec la commande suivante:
$ ./test file
2
3
4
5
"1" test