Basename
| 발표일 | 1979년 1월 |
|---|---|
| 운영 체제 | 유닉스, 유닉스 계열 |
| 종류 | 명령어 |
| 라이선스 | GNU GPL v3 |
basename(베이스네임)은 표준 유닉스 컴퓨터 프로그램이다. basename에 경로 이름을 지정하면 마지막 슬래시('/') 전까지의 앞 글자들을 지우고 결과를 반환한다. basename은 SUS에 기술되어 있으며 주로 셸 스크립트에 쓰인다.
사용법
basename에 대한 SUS의 용법은 다음과 같다.
basename 문자열 [접미사]
문자열- 경로 이름
접미사- 접미사를 지정하면
basename는 접미사 부분도 삭제한다.
- 접미사를 지정하면
예
basename은 경로 이름에서 마지막 이름만을 반환한다.
$ basename /home/jsmith/base.wiki
base.wiki
$ basename /home/jsmith/
jsmith
$ basename /
/
또, basename은 기초 이름의 끝 부분을 제거하는데 사용할 수도 있다.
$ basename /home/jsmith/base.wiki .wiki
base
$ basename /home/jsmith/base.wiki ki
base.wi
$ basename /home/jsmith/base.wiki base.wiki
base.wiki
같이 보기
외부 링크
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.