主题:求Linux实现代码
设计一个菜单驱动程序。如下:
Use one of the following options:
P: To display current directory
S: To display the name of running file
D: To display today’s date and present time
L: To see the listing of files in your present working directory
W: To see who is logged in
Q: To quit this program
Enter your option and hit :
菜单程序将根据用户输入的选择项给出相应信息。要求对用户的输入忽略大小写,对于无效选项的输入给出相应提示。要求使用case语句实现以上功能,输入响应的字母后应该执行响应的命令完成每项功能,如输入P或p,就执行pwd命令。
Use one of the following options:
P: To display current directory
S: To display the name of running file
D: To display today’s date and present time
L: To see the listing of files in your present working directory
W: To see who is logged in
Q: To quit this program
Enter your option and hit :
菜单程序将根据用户输入的选择项给出相应信息。要求对用户的输入忽略大小写,对于无效选项的输入给出相应提示。要求使用case语句实现以上功能,输入响应的字母后应该执行响应的命令完成每项功能,如输入P或p,就执行pwd命令。