I have the following program
#!/bin/bash
exec 3< lista.csv
read -u 3 header
declare -i id_nou
echo "ID: "
read id_nou
while IFS=, && read -u 3 -r id nume prenume seria grupa nota
do
if [ "$id_nou" -eq "$id" ]
then
echo "Nota noua: "
read nota_noua
nota=$nota_noua
print > lista.csv
fi
done
My csv file looks something like this:
id,nume,prenume,grupa,seria,nota
1,Ion,Andrada,1003,A,8
2,Simion,Raluca,1005,A,7
3,Gheorghita,Mihail,1009,B,5
4,Mihailescu,Georgina,1002,A,6
What I'm trying to do is replace the nota value of the correspondent's id with a given by the keyboard value, but this doesn't seem to work. The error message is
line 14: print: command not found