php - Finding tabs and white spaces inside the file in Perl -
We are manually reviewing our code. It is eating more time to review each and every file we are looking at generic items for all files below.
- It would be nice to list the total number of tabs used inside the files.
- List the total number
Help to create an automated tool for code review.
Thanks in advance.
I'm enjoying the count of tabs manually or someone's manual.
Counting tab:
perl -ne '$ c + = () = / \ t / g; END {print qq {$ c}} 'file.pl
or
perl -ne' $ c + = tr / \ t //; END {print qq {$ c}} 'file.pl
and so on for white spaces:
perl -ne' $ c + = Tr / /; END {print qq {$ c}} 'file.pl
Comments
Post a Comment