Prajwalmithun/bash-usecases

Repository for bash scripting use cases

★ 0Forks 0ShellGitHub ↗Compare

README

bash-usecases

Repository for bash scripting use cases

1. User Management Script:

  • Develop a script to manage user accounts on the system.
  • Utilize commands such as useradd, usermod, chpasswd, userdel.
  • Include functionalities for creating a group, adding users to groups and setting passwords.
    Groupname = ninjas
    Username = riya
    Password = riya123

Solution : 1-usermanagement.sh

2. File Management Script:

  • Create a script to automate file management tasks.
  • Use commands like mkdir, touch, echo, chmod, chown
  • The script should create directories, files, add content to files, change the user and group ownership and set permissions accordingly.
    Directory = /var/tmp/UC-2
    Filename = /var/tmp/UC-2/file-UC2.txt
    Content = “hello from use case 2” 
    User ownership of file “file-UC2.txt” = riya
    Group ownership of file “file-UC2.txt” = ninjas
    File permission of “file-UC2.txt” = 740

Solution : 2-filemanagement.sh

Contributors

Prajwalmithunrdorkadi

Issues