Skip to content

Commit d3a8652

Browse files
committed
This scans my scripts directory and gives a count of the different types of scripts
1 parent b4b5430 commit d3a8652

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

script_count.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Script Name : script_count.py
22
# Author : Craig Richards
33
# Created : 27th February 2012
4-
# Last Modified :
5-
# Version : 1.1
4+
# Last Modified : 10th May 2012
5+
# Version : 1.2
66

77
# Modifications : 1.1 - 28-02-2012 - CR - Changed inside github and development functions, so instead of if os.name = "posix" do this else do this etc
88
# : I used os.path.join, so it condensed 4 lines down to 1
9+
# : 1.2 - 10-05-2012 - CR - Added a line to include PHP scripts.
910

10-
# Description : This simple script loads everything I need to carry out the daily checks for our systems.
11+
# Description : This scans my scripts directory and gives a count of the different types of scripts
1112

1213
import os # Load the library module
1314

@@ -54,6 +55,7 @@ def development(): # Start of the function just to count the
5455
print '\nYou have the following :\n'
5556
print 'AutoIT:\t' + str(count_files(path, '.au3')) # Run the count_files function to count the files with the extension we pass
5657
print 'Perl:\t' + str(count_files(path, '.pl'))
58+
print 'PHP:\t' + str(count_files(path, '.php'))
5759
print 'Python:\t' + str(count_files(path, '.py'))
5860
print 'Shell:\t' + str(count_files(path, ('.ksh', '.sh', '.bash')))
5961
print 'SQL:\t' + str(count_files(path, '.sql'))

0 commit comments

Comments
 (0)