900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > Linux中shell编程——编写shell脚本 实现功能:在用户输入年 月后自动打印出对应年月的日

Linux中shell编程——编写shell脚本 实现功能:在用户输入年 月后自动打印出对应年月的日

时间:2023-11-07 11:59:38

相关推荐

Linux中shell编程——编写shell脚本 实现功能:在用户输入年 月后自动打印出对应年月的日

实验目的

理解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/*

运行结果:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。