南昌大学实验报告
姓名:王梦佳
学号:6103115097
邮箱地址:1571212666@qq.com
专业班级:计科153班
实验日期:2018.4.14
课程名称:LINUX程序设计
实验项目名称
Bash Programming
实验目的
To write shell scripts to solve problems
To implement some standard Linux utilities such as ls,cp,etc using system
calls
实验步骤
Use Bash for Shell scripts
- Write a Shell script that accepts a filename, starting and ending line numbers as
arguments and displays all the lines between the given line numbers. - Write a Shell script that deletes all lines containing a specified word in one or more
files supplied as arguments to it. - Write a Shell script that displays list of all the files in the current directory to which
the user has read, Write and execute permissions. - Write a Shell script that receives any number of file names as arguments checks if
every argument supplied is a file or a directory and reports accordingly. Whenever the
argument is a file, the number of lines on it is also reported. - Write a Shell script that accepts a list of file names as its arguments, counts and
reports the occurrence of each word that is present in the first argument file on other
argument files. - Write a Shell script to list all of the directory files in a directory
- Write a Shell script to find factorial of a given integer.
实验数据或结果
第一题 实验结果:

第二题 实验结果:


删去单词linux

第四题 实验结果:

第六题 实验结果:

第七题 实验结果:

网友评论