Code Monkey home page Code Monkey logo

learning-shell's Introduction

learning-shell

lab1

Write a script in shell language, which displays a list of actions with numbers and waits for the number of the command to be entered, and then starts to execute the commands given in this command.

The script should correctly handle the situation when the input stream ends and allow to work with relative and absolute names of files and directories, which may contain: spaces and tabulation symbols; symbols '*', '?', '[', ']', '-', '~', '$' or consist only of them.

For deletion commands, you must request your own confirmation additionally. The request text must correspond to the system text (output by the rm command). Waiting for the response is on a new line.

Organize error handling, for example, if there is no file to be deleted, for which purpose redirect the output of system error messages to the log file named lab1_err, located in the home directory, and issue its message to the standard error stream. Each input request should be accompanied by a message on a separate line containing information about what data should be entered.

Waiting for input occurs on a new line.

Exiting the script should be done only when the corresponding menu item is selected or the standard input stream is finished. Each argument must be submitted to the program on a separate line.

Menu features:

  • Create a directory
  • Change the current directory
  • Print the contents of the current directory
  • Move a file
  • Delete the directory with its contents
  • Exit the program

lab2

Write two scripts in shell language, which output lists of: (lab2-1.sh) directory names in the specified directory that have at least one subdirectory. Sort the list by modification time; (lab2-2.sh) groups that have more than the specified number of users.

lab3

Write two scripts to output: (lab3-3.sh) List of users that are allowed to execute the specified file; (lab3-12.sh) List of directories, in which the specified user has the right to delete files.

All the necessary information must be passed to the script through the command line arguments. Select all files from the current directory, excluding its subdirectories.

learning-shell's People

Contributors

maanti avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.