1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages.ko/common/shfmt.md

21 lines
520 B
Markdown
Raw Normal View History

# shfmt
> 셸 파서, 포매터 및 인터프리터.
> 더 많은 정보: <https://pkg.go.dev/mvdan.cc/sh>.
- 셸 스크립트를 포맷된 버전으로 출력:
`shfmt {{경로/대상/파일}}`
- 포맷되지 않은 파일 목록:
`shfmt --list {{경로/대상/폴더}}`
- 결과를 터미널에 출력하지 않고 파일에 작성:
`shfmt --write {{경로/대상/파일}}`
- 코드 단순화, 불필요한 구문 제거 (예: 표현식에서 변수의 "$" 제거):
`shfmt --simplify {{경로/대상/파일}}`