实验目的
理解shell程序的设计方法掌握shell程序编辑、运行、调试方法与过程实验内容
shell简单编程
实验过程
要求:
1.记录实验过程,对关键过程进行文字说明并附上操作截屏。
2.逻辑清晰、排版美观。
编写shell脚本,实现功能:在用户输入年、月后自动打印出对应年月的日历。
程序代码:
[c@localhost ~]$ mkdir /tmp/test[c@localhost ~]$ cd /tmp[c@localhost tmp]$ chmod 751 test[c@localhost tmp]$ cd test[c@localhost test]$ mkdir dir1 dir2 dir3[c@localhost test]$ lsdir1 dir2 dir3[c@localhost test]$ chmod 764 dir1 dir2 dir3[c@localhost test]$ touch file1 file2[c@localhost test]$ lsdir1 dir2 dir3 file1 file2[c@localhost test]$ cd[c@localhost ~]$ ls -l /tmp/*
运行结果: