Bash is a Unix shell written by Brian Fox as a free replacement for the Bourne shell, released in 1989. It explores Bash scripts which allow users to create and run shell scripts, covering topics like variables, conditional statements, loops, functions, string manipulation, I/O redirection, and special commands like grep, find, awk, sed, and alias. The document provides examples and explanations of how to use these Bash scripting elements and commands.
3. ? Bash is a Unix shell written by Brian Fox for the GNU Project
as a free software replacement for the Bourne shell .
? Released in 1989,it has been distributed widely as the shell
for the GNU operating system and as a default shell on
Linux and Mac OS X.
40. a.Grep
? Is used to search a characters chain within a file
? -v displays the lines that do not contain the string
? -c count the number of lines containing the string
? -n each line containing the string is numbered
? -x the line that exactly matches the string
? -l displays the names of files that contain the string
42. b.Find
? Is used to fined files based on specific criteria.
? Syntax: find <folder> <search criteria>
? -name search by name
? -perm search by access rihghts on file,
? -user search by files owner,
? -group search by files group,
46. c.Awk
? Is used to print specific lines and columns from a file, with
conditions.
? Syntax : awk '{print $NF}' file
49. d.Sed
? The SED UNIX Command in Linux enables you to work with
the text inside your files and can be used to perform
different functions to it.
? Syntax :
52. e.Alias
? Is used to enable a replacement of a command by
another string
? Syntax : alias myalias=command_name