리눅스 printf

(Printf에서 넘어옴)

1 개요[ | ]

/usr/bin/printf
printf
  • 문자열 출력 리눅스 명령어

2 문자열 출력[ | ]

Console
Copy
[root@zetawiki ~]# printf "hello\n"
hello
[root@zetawiki ~]# printf 'hello\n'
hello

3 배열 출력[ | ]

Console
Copy
[root@zetawiki ~]# ARR=("John Smith" "Jane Doe" "Mike Barnes" "Kevin Patterson")
[root@zetawiki ~]# printf '%s\n' "${ARR[@]}"
John Smith
Jane Doe
Mike Barnes
Kevin Patterson

4 같이 보기[ | ]