forked from peter9949/Team-Curie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
32 lines (31 loc) · 932 Bytes
/
test.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
25
26
27
28
29
30
31
32
#!/bin/bash
REPO=https://github.com/peter9949/Team-Curie.git
NAME=$(echo $REPO|sed -r 's^./(.).git^\1^')
OUTPUT_FILE=Team-Curie.csv
git clone $REPO
cd $NAME
for file in $(ls);
do
if [[ $file == *.py ]];
then
python $file |sed 's/ /,/g' >> $OUTPUT_FILE
elif [[ $file == *.js ]];
then
node $file |sed 's/ /,/g' >> $OUTPUT_FILE
elif [[$file == *.cpp]];
then
c++ $file |sed 's/ /,/g' >> $OUTPUT_FILE
elif [[$file == *.pl]];
then
Perl $file |sed 's/ /,/g' >> $OUTPUT_FILE
elif [[$file == *.c]];
then
c $file |sed 's/ /,/g' >> $OUTPUT_FILE
elif [[$file == *.java]];
then
java $file |sed 's/ /,/g' >> $OUTPUT_FILE
elif [[ $file == *.R ]];
then
Rscript $file |sed G |sed 's/ /,/g' >> $OUTPUT_FILE
fi
done