⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
TYPO3 Core
All Projects
TYPO3 Core
Overview
Activity
Roadmap
Issues
Repository
Download (431 Bytes)
Bug #52294
ยป find-exception-duplicates.sh
Christian Kuhn
, 2013-09-26 13:55
#!/bin/bash
EXCEPTIONS
=
`
ack-grep
--type
php
'throw new'
-A5
|
grep
'[[:digit:]]\{10\}'
`
DUPLICATES
=
`
echo
$EXCEPTIONS
|
awk
'{
for(i=1; i<=NF; i++) {
tmp=match($i, /[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/);
if(tmp) {
print $i
}
}
}'
|
cut
-d
';'
-f1
|
tr
-cd
'0-9\012'
|
sort
|
uniq
-d
`
for
CODE
in
$DUPLICATES
;
do
echo
"Possible duplicate exception code
$CODE
"
ack-grep
--type
php
$CODE
echo
echo
done
(1-1/1)
Loading...