Regex-1.1 Regular Expression Introduction


Make sure to subscribe to my channel for more videos on UNIX, Perl and SQL.
facebook: facebook.com/fuzicast
twitter: @fuzicast
youtube: youtube.com/yuejdesigner85

\w – matches a alphanumeric character
\d – matches a number
\s – matches a space
\W, \D, \S – opposite of \w, \d, \s
^ – beginning of line
$ – end of line character
. – match any character except for newline
* – 0 or more occurrence
+ – 1 or more occurrence
? – 0 or 1 occurrence
| – alternative match
(regex) – grouping/store match
[ ] – character set/class
{ x,y } – number of occurrence between x and y
{ x } – x occurrence
{ x, } – at least x occurrence
[^ ] – opposite of [ ]
*? – non greedy matching

Advertisements

UNIX-1.2 UNIX Introduction and Basic Commands


Make sure to subscribe to my channel for more videos on UNIX, Perl and SQL.
facebook: http://www.facebook.com/fuzicast
twitter: @fuzicast
youtube: http://www.youtube.com/yuejdesigner85

Here are the list of unix commands used in this tutorial
file types
c – character file
b – block file
l – link
s – socket
/usr – stored application system files
/var – stores email, log files and such
/tmp – stores temporary files
uptime – host up time
w – current users in session
env – environment variables
clear – clears console screen
ctrl + u – clears command line
ctrl + a – move cursor to beginning of command line
ctrl + e – move cursor to end of command line
cat – spit out file content to standard output
tac – same as cat, but spit out file in reverse order
less – view file
more – view file
cal – calendar
top – view processes currently running