Unix, September, 21, 2017

Relational operators

*Remember your WildCards!!! (?*[ ][ *])

Regular Expressions

————————————————————————

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