mistral-io-datasets/scripts/extract-conf-data.sh

19 lines
463 B
Bash
Raw Permalink Normal View History

2020-08-27 13:18:36 +00:00
#!/bin/bash
if [[ ! -e datasets/job_metadata_confidential.csv ]] ; then
exit 0
fi
# This script extracts the actual usernames and job-informations
# As it is confidential information, we cannot include the files
for I in $@ ; do
DATA=$(grep $I datasets/job_metadata.csv | cut -d "," -f 7-)
echo -n $I,
2020-08-27 15:11:08 +00:00
if [[ "$DATA" == "" ]] ; then
echo "No data found"
continue
fi
2020-08-27 13:18:36 +00:00
grep $DATA datasets/job_metadata_confidential.csv | cut -d "," -f 1-5
done