Skip to content

Commit 0e47055

Browse files
committed
only read one file and print one file content
1 parent 4350f48 commit 0e47055

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • implement-shell-tools/cat

implement-shell-tools/cat/cat.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import sys
2+
3+
args = sys.argv[1:]
4+
5+
path = args[0]
6+
7+
with open(path, "r") as file:
8+
content = file.read()
9+
print(content)

0 commit comments

Comments
 (0)