forked from Mosadoluwa-A/Team-Lamarck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
csv-producer.sh
executable file
·24 lines (20 loc) · 1.1 KB
/
csv-producer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
git clone https://github.com/Mosadoluwa-A/Team-Lamarck
cd Team-Lamarck
echo "Running compilers for C and C++"
ls *.c| parallel gcc -o {.}.c-program {};
ls *.cpp| parallel g++ -o {.}.cpp-program {};
echo "Time for main scripts"
echo "Name,email,slack_username,biostack,twitter_handle,hamming_distance">>team_lamarck.csv
ls *.py|parallel "python3 {} |awk -F': ' ' {print \$0}' |paste -sd ',' >>team_lamarck.csv"
ls *.js|parallel "node {} |awk -F': ' ' {print \$0}' |paste -sd ','>>team_lamarck.csv "
ls *.R|parallel "Rscript {} |awk -F': ' ' {print \$0}'|paste -sd ','>>team_lamarck.csv "
ls *.java|parallel "java {} |awk -F': ' ' {print \$0}'|paste -sd ','>>team_lamarck.csv "
ls *.swift|parallel "swift {} |awk -F': ' ' {print \$0}' |paste -sd ','>>team_lamarck.csv"
ls *.php|parallel "php {} |paste -d ','>>team_lamarck.csv"
ls *.c-program|parallel "./{} |awk -F': ' ' {print \$0}' |paste -sd ',' >>team_lamarck.csv"
ls *.cpp-program|parallel "./{} |awk -F': ' ' {print \$0}' |paste -sd ','>>team_lamarck.csv"
echo "Removing the temporary c files"
rm *.cpp-program
rm *.c-program
echo "Go Team Lamarck!"