-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManPwd.java
More file actions
28 lines (25 loc) · 1.37 KB
/
ManPwd.java
File metadata and controls
28 lines (25 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package src;
import java.util.Scanner;
public class ManPwd {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
System.out.print("명령어를 입력하세요 (예: man_pwd, exit): ");
String input = scanner.nextLine();
if (input.equals("man_pwd")) {
System.out.println("pwd - 현재 작업중인 디렉토의 이름을 반환합니다.\n");
System.out.println("pwd 유틸리티는 현재 작업 디렉토리의 절대 경로 이름을 표준 출력에 출력합니다.\n" +
"일부 셸(shell)에서는 이 유틸리티와 유사하거나 동일한 pwd 명령을 내장 명령어로 제공할 수도 있습니다.\n");
System.out.println("옵션\n" +
"-L: 현재 논리적 작업 디렉토리를 생성합니다.\n" +
"-P: 현재 물리적 작업 디렉토리를 생성합니다.\n");
System.out.println("옵션을 지정하지 않으면 기본적으로 -L 옵션을 사용합니다.\n");
} else if (input.equals("exit")) {
System.out.println("프로그램을 종료합니다.");
break;
} else {
System.out.println("알 수 없는 명령어입니다.");
}
}
}
}