testlauf mit ggs daten
This commit is contained in:
26
reference.bash
Normal file
26
reference.bash
Normal file
@@ -0,0 +1,26 @@
|
||||
SOURCE_FILE="$1"
|
||||
SCHOOL="$2"
|
||||
|
||||
|
||||
|
||||
cat "$SOURCE_FILE" | while read new_line; do
|
||||
nachname=$(echo $new_line | cut -f 1 -d';')
|
||||
vorname=$(echo $new_line | cut -f 2 -d';')
|
||||
klasse=$(echo $new_line | cut -f 3 -d';')
|
||||
|
||||
|
||||
# Prüfung; wenn der Schüler noch nicht in der alten Liste existiert, dann überspringe (continue) ihn
|
||||
#echo "grep $nachname /root/sj/ox-export/lists/schueler_HL070${SCHOOL}.csv_intern| grep -q $vorname || continue"
|
||||
grep "${nachname};" /root/sj/ox-export/lists/schueler_HL070${SCHOOL}.csv_intern| grep -q "$vorname" || continue
|
||||
|
||||
|
||||
old_line=$(grep "$nachname" /root/sj/ox-export/lists/schueler_HL070${SCHOOL}.csv_intern| grep "$vorname" )
|
||||
recordID=$(echo $old_line | cut -f 4 -d';')
|
||||
mb_quota=$(echo $old_line | cut -f 5 -d';')
|
||||
ox_quota=$(echo $old_line | cut -f 6 -d';')
|
||||
ox_context=$(echo $old_line | cut -f 7 -d';')
|
||||
|
||||
|
||||
|
||||
#echo "${nachname};${vorname};HL070${SCHOOL}-${klasse};${recordID};${mb_quota};${ox_quota};${ox_context}"
|
||||
echo "${nachname};${vorname};HL070${SCHOOL}-${klasse};${recordID};1024;${ox_quota};${ox_context}"
|
||||
Reference in New Issue
Block a user