Unix, September, 21, 2017
Relational operators
- eq is equal to
- ne is not equal to
- le is less than or equal to
- lt is less than
- gt is greater than
- ge is greater than or equal to
*Remember your WildCards!!! (?*[ ][ *])
Regular Expressions
- match any single symbol
- 0 or more of the previous
- [] character class match one of any of the enclosed
- [^ ] inverted - do NOT match
- ^ match start of line
- $ match end of line
- \< match start of word
- \> match end of word
————————————————————————
- + one or more of the previous
- () grouping
- | OR
We were asked to preform a solution for a problem to rearrange our ls -l list like this :
[filename]:(perms), user/group.
the solution was:
ls -l | grep -v '^total' | sed 's/ */ /g' | sed 's/^\(……….\) [0-9][0-9]* \([a-z][a-z0-9]*\) \([a-z][a-z0-9]*\).* \(.*\)$/[\4]:(\1),\2\/\3/g'
*Grep is basically a tool to be able to match certain parts of a text.
XTE!!!!
* xte is a command that is downloaded on the pods in the lair, and it can be used to automate mouse and, or the keyboard functions.
Commands
key k
Press and release key k
keydown “k”
Press key k down
keyup k
Release key k
str string
Do a bunch of key X events for each char in string
mouseclick i
Click mouse button i
mousemove x y
Move mouse to screen position x, y
mousermove x y
Move mouse relative from current location by x, y
mousedown i
Press mouse button i down
mouseup i
Release mouse button i
sleep x
Sleep x seconds
usleep x
Usleep x microseconds