Shells, Scripting and Automation

This topic is part of our Linux Network Services and Security training

Even though Linux has a lot of commands, sometimes it is necessary to write simple (and some not so simple) scripts when we have to automate jobs.

The Bash shell is capable of running scripts and it also possible to write scripts in the various programming languages that exist in Linux (such as AWK, Python and Ruby).

The following scripts need to be written and tested:

  • booklist
    Manage a book database: print, insert, select, delete, update
  • compareperm
    Check whether two files have the same permissions
    Usage: compareperm file1 file2
  • largestfile
    prints the largest file in a directory
    Usage: largestfile directory
  • findhardlinks
    Find links (not symbolic) to a given file
    Usage: findhardlinks file [directory]
  • summarise
    prints number of normal files, directories and symbolic links
    summarise directory
  • combine
    Sorts and merges the content of two files
    Usage: combine file1 file2
  • anagrams
    Write a program which displays all anagrams from
    /usr/share/dict/words
This topic is part of our Linux Network Services and Security training

Speak Your Mind

*