Skip to content

Commit f8941fb

Browse files
committed
added right-justify to output
1 parent 350c3f2 commit f8941fb

File tree

1 file changed

+2
-2
lines changed
  • implement-shell-tools/cat

1 file changed

+2
-2
lines changed

implement-shell-tools/cat/cat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
if lin == "":
2727
print()
2828
else:
29-
print(line_num, lin)
29+
print(str(line_num).rjust(6), lin)
3030
line_num += 1
3131
elif args.n:
32-
print(" ", line_num, lin)
32+
print(str(line_num).rjust(6), "", lin)
3333
line_num += 1
3434

3535
else:

0 commit comments

Comments
 (0)