Skip to content

Commit bb5f700

Browse files
committed
timestamp added
1 parent dfed12c commit bb5f700

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

findFunc.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
input=$1 #file with the list of functions
88
sourceCodePATH=$2 #locate of the source code
99
output=$3 # output path
10+
timestamp=$(date +"%F-%T")
11+
12+
echo -e "This is an archive of dangerous programming functions known for causing security vulnerabilities in software\n $timestamp" >> "$output/results-$timestamp.txt"
1013

11-
echo -e "This is an archive of dangerous programming functions known for causing security vulnerabilities in software\n" >> "$output/results.txt"
1214
while IFS= read -r line
1315
do
14-
echo -e "\n########### $line ###########\n" >> "$output/results.txt"
15-
find "$sourceCodePATH" -type f -exec grep -wnH "$line" {} \; |tee -a "$output/results.txt"
16-
echo -e "\n" >> "$output/$results.txt"
16+
echo -e "\n########### $line ###########\n" >> "$output/results-$timestamp.txt"
17+
find "$sourceCodePATH" -type f -exec grep -wnH "$line" {} \; |tee -a "$output/results-$timestamp.txt"
18+
echo -e "\n" >> "$output/results-$timestamp.txt"
1719
done < "$input"

0 commit comments

Comments
 (0)