File: printf.py

package info (click to toggle)
filecheck 0.0.24%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,384 kB
  • sloc: python: 1,132; sh: 26; makefile: 14; ansic: 10
file content (11 lines) | stat: -rw-r--r-- 233 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
import sys

if len(sys.argv) != 2:
    print("error: printf: expect one argument to be provided")
    exit(1)

formatted_string = sys.argv[1]

formatted_string = formatted_string.replace("\\n", "\n")

print(formatted_string, end="")