Shell is a programming environment that terminal runs. it's a text based GUI for interacting with your system.
shell can give you information about your system, allows you to modify and run programs. let's try something
say "hello pris"
== Rules == | |
On Infrastructure | |
----------------- | |
There is one system, not a collection of systems. | |
The desired state of the system should be a known quantity. | |
The "known quantity" must be machine parseable. | |
The actual state of the system must self-correct to the desired state. | |
The only authoritative source for the actual state of the system is the system. | |
The entire system must be deployable using source media and text files. |
import re | |
explicits = ( | |
u'\u202a', # LEFT-TO-RIGHT EMBEDDING | |
u'\u202b', # RIGHT-TO-LEFT EMBEDDING | |
u'\u202d', # LEFT-TO-RIGHT OVERRIDE | |
u'\u202e', # RIGHT-TO-LEFT OVERRIDE | |
) | |
pdf = u'\u202c' # POP DIRECTIONAL FORMATTING |
{ | |
"id": "0123456789abcdef", | |
"name": "myname", | |
"provider": "puppet", | |
"os": { | |
"name": "linux", | |
"version": "2.6.35-22-generic", | |
"vendor": "ubuntu", | |
"vendor_version": "10.10" | |
}, |
{ | |
"id": "0123456789abcdef", | |
"name": "myname", | |
"provider": "puppet", | |
"role": "some_identifier_from_cm_system_can_be_nil?", | |
"timestamp": 1290616560, | |
"provisioned": "true", | |
"os": { | |
"name": "linux", | |
"version": "2.6.35-22-generic", |
.................F | |
====================================================================== | |
FAIL: Test installing from a local directory. | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "C:\Dev\pip\ve\lib\site-packages\nose\case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "C:\Dev\pip\tests\test_basic.py", line 287, in test_install_from_local_directory | |
result = run_pip('install', to_install, expect_error=False) | |
File "C:\Dev\pip\tests\test_pip.py", line 518, in run_pip |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect