We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f5649f commit 14fca64Copy full SHA for 14fca64
1 file changed
implement-shell-tools/wc/wc.py
@@ -36,7 +36,13 @@ def process_file(file_path):
36
elif args.char:
37
print(f"{stats['characters']} {file_path}}")
38
else:
39
- print(f"{stats['lines']} {stats['words']} {stats['characters']} {file_path}}")
+ print(f"{stats['lines']} {stats['words']} {stats['characters']} {file_path}")
40
+
41
42
+ total_lines += stats['lines']
43
+ total_words += stats['words']
44
+ total_characters += stats['characters']
45
+ file_count += 1
46
47
48
total_lines = 0
@@ -51,11 +57,6 @@ def process_file(file_path):
51
57
52
58
53
59
54
- total_lines += stats['lines']
55
- total_words += stats['words']
56
- total_characters += stats['characters']
- file_count += 1
-
60
elif os.path.isdir(path):
61
for file in os.listdir(path):
62
file_path = os.path.join(path, file)
0 commit comments