forked from IUREDCap/redcap-etl-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spell.sh
executable file
·48 lines (44 loc) · 1.52 KB
/
spell.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#-------------------------------------------------------
# Copyright (C) 2019 The Trustees of Indiana University
# SPDX-License-Identifier: BSD-3-Clause
#-------------------------------------------------------
files=( "./web/user_manual.php" "./web/admin/info.php" );
for file in "${files[@]}"
do
echo "FILE: ${file}";
echo "===============================================================";
cat ${file} \
| sed 's/[Aa]dmin//g;' \
| sed 's/alt=//g;' \
| sed 's/API//g;' \
| sed 's/[Cc]onfig[^u]//g;' \
| sed 's/\.com//g;' \
| sed 's/css//g;' \
| sed 's/ETL//g;' \
| sed 's/github//g;' \
| sed 's/https//g;' \
| sed 's/IU//g;' \
| sed 's/<\?php//g;' \
| sed 's/\.png//g;' \
| sed 's/redcap-etl//g;' \
| sed 's/REDCap-ETL//g;' \
| sed 's/REDCap//g;' \
| sed 's/SPDX-License-Identifier//g;' \
| sed 's/SSH//g;' \
| sed 's/<[^>]*>//g;' \
| sed 's/use [_a-zA-Z0-9\\]*;//g' \
| sed 's/require_once[^;]*;//g' \
| sed 's/\@[_a-zA-Z][_a-zA-Z0-9]*//g' \
| sed 's/\$[_a-zA-Z][_a-zA-Z0-9]*//g' \
| sed 's/->[_a-zA-Z][_a-zA-Z0-9]*(//g' \
| sed 's/[_a-zA-Z][_a-zA-Z0-9]*(//g' \
| sed 's/[_a-zA-Z][_a-zA-Z0-9]*::[_a-zA-Z][_a-zA-Z0-9]*//g' \
| sed 's/\?[_a-zA-Z][_a-zA-Z0-9]*=//g' \
| sed 's/\&[_a-zA-Z][_a-zA-Z0-9]*=//g' \
| sed 's/RedCapEtlModule//g;' \
| spell \
| sort \
| uniq;
echo;
done