Creato da pastuweb.com
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub

BASH
is a shell used in the text of the GNU operating system Unix and Unix-like systems, especially GNU / Linux, but also available for Microsoft Windows (see, eg, Cygwin).

It is a command interpreter which allows the user to communicate with the operating system through a series ofpredefined functions, or to run programs. bash is able to execute commands that are passed using the input and output redirectionto run multiple programs in a cascade software pipeline, passing the previous command's output as input for the next command.

In addition to this, bash provides a simple scripting languagethat allows to perform more complex tasks, not only gathering in a script a series of commands, but also using variables, functions and control structures of the flow.

Examples:

((expr)) evaluates the \ 'whole expression, including let expr
[[expr]] head \ 's expression
(expr) returns the value of \ 'expression
! reverses the expr \ 'expression
(List) are executed in a subshell
{List} are executed in the same shell
$ {N} we refer to \ 'N-th parameter
$ * Refers to all parameters
$ @ Refers to all the parameters listed
$ # The number of parameters to the command line
$ $ Process ID
$! ID of the process launched in the background to last
$ 0 filename
a {d, c, b} and creates all combinations ade ace abe
PATH contains a list of system paths
HOME contains the location of the home
read read a line and puts in $ REPLY line, or the content of the variable that is set
read var1 var2 var3 inserted word for word and in \ 'last all the rest


AWK
AWK is a language for computer-oriented data manipulation oftextual type, both in the form of files that flow of data comingfrom standard input.

AWK is a typical language that extensively uses the string type,associative arrays (that is, arrays indexed by key strings), and regular expressions.

AWK can be used as a filter, was one of the first instruments tomake its appearance from Version 7 Unix and gained thereputation of being just a way to add computing capacity to aUnix pipeline. The AWK is now present in the standard application of any recent version of the Unix operating system


Regular Expressions for AWK
/ between slesh /
~ espressioneregolare variable is true if the regular expressionmatches the variable
\ Escape character
^ Matches the beginning
$ Matches the end
. a single character
[] Any (once) of the characters between the []
[^] Everything except those contained
| or
* Any number of times
+ One or more times
? zero or one time
{n, m} a number of times between n and m


Pattern
/ expr / regular expression
true if expr is the expression
pat1, pat2 in the range between comrpeso pat1 and pat2
Begin at the beginning
END at the end
empty in any case
next moves on to deal the next line
exit terminates the program

Average (1 Vote)
The average rating is 5.0 stars out of 5.