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 9b645e6 commit 516af11Copy full SHA for 516af11
implement-shell-tools/wc/wc.py
@@ -8,7 +8,7 @@
8
parser.add_argument("path",nargs="+")
9
args=parser.parse_args()
10
11
-print(args)
+
12
paths=args.path
13
words_count=0
14
total_lines=0
@@ -34,5 +34,9 @@
34
(f"{bytes_count:<5}" if args.c else "")+
35
f"{file:<20}")
36
37
-
38
-print(f"{total_lines:<5}{total_words:<5}{total_bytes:<5}total")
+if len(paths)>1 :
39
+ print((f"{total_lines:<5}" if args.l else "")+
40
+ (f"{total_words:<5}" if args.w else "")+
41
+ (f"{total_bytes:<5}" if args.c else "")+
42
+ "total")
0 commit comments