author | amit@thunder |
Thu, 25 Feb 2010 00:04:27 +0530 | |
changeset 27 | cb14131583c6 |
child 28 | 514098969b11 |
permissions | -rw-r--r-- |
27
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1 |
<html> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
2 |
<head> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
3 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
4 |
<title> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
5 |
Chapter. session |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
6 |
</title> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
7 |
<link rel="stylesheet" href="/review/support/styles.css" type="text/css" /> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
8 |
<meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
9 |
<link rel="shortcut icon" type="image/png" href="/review/support/figs/favicon.png" /> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
10 |
<script type="text/javascript" src="/review/support/jquery-min.js"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
11 |
</script> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
12 |
<script type="text/javascript" src="/review/support/form.js"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
13 |
</script> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
14 |
<script type="text/javascript" src="/review/support/hsbook.js"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
15 |
</script> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
16 |
</head> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
17 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
18 |
<div class="chapter" id="chn10session4"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
19 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
20 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
21 |
<div class="toc"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
22 |
<p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
23 |
<b> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
24 |
Table of Contents |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
25 |
</b> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
26 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
27 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
28 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
29 |
<span class="article"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
30 |
<a href="#id2501738"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
31 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
32 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
33 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
34 |
<dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
35 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
36 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
37 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
38 |
<a href="#id2311829"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
39 |
1. More text processing |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
40 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
41 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
42 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
43 |
<dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
44 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
45 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
46 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
47 |
<a href="#id2499853"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
48 |
1.1. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
49 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
50 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
51 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
52 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
53 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
54 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
55 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
56 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
57 |
<a href="#id2552760"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
58 |
1.2. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
59 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
60 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
61 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
62 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
63 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
64 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
65 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
66 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
67 |
<a href="#id2552862"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
68 |
1.3. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
69 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
70 |
join |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
71 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
72 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
73 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
74 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
75 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
76 |
</dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
77 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
78 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
79 |
<a href="#id2552962"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
80 |
2. Generating a word frequency list |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
81 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
82 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
83 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
84 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
85 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
86 |
<a href="#id2553109"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
87 |
3. Basic editing and editors |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
88 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
89 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
90 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
91 |
<dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
92 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
93 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
94 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
95 |
<a href="#id2553118"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
96 |
3.1. vim |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
97 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
98 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
99 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
100 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
101 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
102 |
<a href="#id2553684"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
103 |
3.2. SciTE |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
104 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
105 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
106 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
107 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
108 |
</dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
109 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
110 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
111 |
<a href="#id2553729"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
112 |
4. Personalizing your Environment |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
113 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
114 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
115 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
116 |
<dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
117 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
118 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
119 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
120 |
<a href="#id2553738"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
121 |
4.1. .bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
122 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
123 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
124 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
125 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
126 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
127 |
<a href="#id2554039"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
128 |
4.2. .vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
129 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
130 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
131 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
132 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
133 |
</dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
134 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
135 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
136 |
<a href="#id2554257"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
137 |
5. Subshells and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
138 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
139 |
source |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
140 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
141 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
142 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
143 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
144 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
145 |
</dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
146 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
147 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
148 |
<div class="article"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
149 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
150 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
151 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
152 |
<h2 class="title" id="id2501738"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
153 |
</h2> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
154 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
155 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
156 |
<h2 class="title" id="id2501738"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
157 |
</h2> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
158 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
159 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
160 |
<hr /> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
161 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
162 |
<div class="toc"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
163 |
<p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
164 |
<b> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
165 |
Table of Contents |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
166 |
</b> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
167 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
168 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
169 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
170 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
171 |
<a href="#id2311829"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
172 |
1. More text processing |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
173 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
174 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
175 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
176 |
<dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
177 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
178 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
179 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
180 |
<a href="#id2499853"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
181 |
1.1. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
182 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
183 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
184 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
185 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
186 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
187 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
188 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
189 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
190 |
<a href="#id2552760"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
191 |
1.2. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
192 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
193 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
194 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
195 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
196 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
197 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
198 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
199 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
200 |
<a href="#id2552862"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
201 |
1.3. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
202 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
203 |
join |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
204 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
205 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
206 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
207 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
208 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
209 |
</dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
210 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
211 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
212 |
<a href="#id2552962"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
213 |
2. Generating a word frequency list |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
214 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
215 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
216 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
217 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
218 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
219 |
<a href="#id2553109"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
220 |
3. Basic editing and editors |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
221 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
222 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
223 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
224 |
<dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
225 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
226 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
227 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
228 |
<a href="#id2553118"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
229 |
3.1. vim |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
230 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
231 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
232 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
233 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
234 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
235 |
<a href="#id2553684"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
236 |
3.2. SciTE |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
237 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
238 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
239 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
240 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
241 |
</dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
242 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
243 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
244 |
<a href="#id2553729"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
245 |
4. Personalizing your Environment |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
246 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
247 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
248 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
249 |
<dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
250 |
<dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
251 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
252 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
253 |
<a href="#id2553738"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
254 |
4.1. .bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
255 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
256 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
257 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
258 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
259 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
260 |
<a href="#id2554039"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
261 |
4.2. .vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
262 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
263 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
264 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
265 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
266 |
</dd> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
267 |
<dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
268 |
<span class="section"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
269 |
<a href="#id2554257"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
270 |
5. Subshells and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
271 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
272 |
source |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
273 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
274 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
275 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
276 |
</dt> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
277 |
</dl> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
278 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
279 |
<div class="section" title="1.More text processing"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
280 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
281 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
282 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
283 |
<h2 class="title" style="clear: both"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
284 |
<a name="id2311829"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
285 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
286 |
1.More text processing |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
287 |
</h2> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
288 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
289 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
290 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
291 |
<div class="section" title="1.1.sort"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
292 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
293 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
294 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
295 |
<h3 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
296 |
<a name="id2499853"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
297 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
298 |
1.1. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
299 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
300 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
301 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
302 |
</h3> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
303 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
304 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
305 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
306 |
<p id="ch10session4_1"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
307 |
Let's say we have a file which lists a few of the stalwarts of the open source community and a few details about them, like their "other" name, their homepage address, and what they are well known for or their claim to fame. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
308 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
309 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
310 |
Richard Stallman%rms%GNU Project |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
311 |
Eric Raymond%ESR%Jargon File |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
312 |
Ian Murdock% %Debian |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
313 |
Lawrence Lessig% %Creative Commons |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
314 |
Linus Torvalds% %Linux Kernel |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
315 |
Guido van Rossum%BDFL%Python |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
316 |
Larry Wall% %Perl |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
317 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
318 |
<p id="ch10session4_2"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
319 |
The sort command enables us to do this in a flash! Just running the sort command with the file name as a parameter sorts the lines of the file alphabetically and prints the output on the terminal. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
320 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
321 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
322 |
$ sort stalwarts.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
323 |
Eric Raymond%ESR%Jargon File |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
324 |
Guido van Rossum%BDFL%Python |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
325 |
Ian Murdock% %Debian |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
326 |
Larry Wall% %Perl |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
327 |
Lawrence Lessig% %Creative Commons |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
328 |
Linus Torvalds% %Linux Kernel |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
329 |
Richard Stallman%rms%GNU Project |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
330 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
331 |
<p id="ch10session4_3"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
332 |
If you wish to sort them reverse alphabetically, you just need to pass the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
333 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
334 |
-r |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
335 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
336 |
option. Now, you might want to sort the lines, based on each person's claim to fame or their "other" name. What do we do in that case? |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
337 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
338 |
<p id="ch10session4_4"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
339 |
Below is an example that sorts the file based on "other" names. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
340 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
341 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
342 |
$ sort -t % -k 2,2 stalwarts.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
343 |
|
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
344 |
Ian Murdock% %Debian |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
345 |
Larry Wall% %Perl |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
346 |
Lawrence Lessig% %Creative Commons |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
347 |
Linus Torvalds% %Linux Kernel |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
348 |
Guido van Rossum%BDFL%Python |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
349 |
Eric Raymond%ESR%Jargon File |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
350 |
Richard Stallman%rms%GNU Project |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
351 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
352 |
<p id="ch10session4_5"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
353 |
Sort command assumes white space to be the default delimiter for columns in each line. The |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
354 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
355 |
-t |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
356 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
357 |
option specifies the delimiting character, which is |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
358 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
359 |
% |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
360 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
361 |
in this case. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
362 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
363 |
<p id="ch10session4_6"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
364 |
The |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
365 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
366 |
-k |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
367 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
368 |
option starts a key at position 2 and ends it at 2, essentially telling the sort command that it should sort based on the 2nd column, which is the other name. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
369 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
370 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
371 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
372 |
also supports conflict resolution using multiple columns for sorting. You can see that the first three lines have nothing in the "other" names column. We could resolve the conflict by sorting based on the project names (the 3rd column). |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
373 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
374 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
375 |
$ sort -t % -k 2,2 -k 3,3 stalwarts.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
376 |
|
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
377 |
Lawrence Lessig% %Creative Commons |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
378 |
Ian Murdock% %Debian |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
379 |
Linus Torvalds% %Linux Kernel |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
380 |
Larry Wall% %Perl |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
381 |
Guido van Rossum%BDFL%Python |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
382 |
Eric Raymond%ESR%Jargon File |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
383 |
Richard Stallman%rms%GNU Project |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
384 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
385 |
<p id="ch10session4_7"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
386 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
387 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
388 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
389 |
also has a lot of other options like ignoring case differences, month sort(JAN<FEB<...), merging already sorted files. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
390 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
391 |
man sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
392 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
393 |
would give you a lot of information. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
394 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
395 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
396 |
<div class="section" title="1.2.uniq"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
397 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
398 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
399 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
400 |
<h3 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
401 |
<a name="id2552760"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
402 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
403 |
1.2. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
404 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
405 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
406 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
407 |
</h3> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
408 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
409 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
410 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
411 |
<p id="ch10session4_8"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
412 |
Suppose we have a list of items, say books, and we wish to obtain a list which names of all the books only once, without any duplicates. We use the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
413 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
414 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
415 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
416 |
command to achieve this. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
417 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
418 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
419 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
420 |
The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
421 |
The Mythical Man Month: Essays on Software Engineering |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
422 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
423 |
The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
424 |
Structure and Interpretation of Computer Programs |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
425 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
426 |
Compilers: Principles, Techniques, and Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
427 |
The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
428 |
The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
429 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
430 |
The Art of Computer Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
431 |
Introduction to Algorithms |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
432 |
The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
433 |
The Pragmatic Programmer: From Journeyman to Master |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
434 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
435 |
Unix Power Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
436 |
The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
437 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
438 |
<p id="ch10session4_9"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
439 |
Let us try and get rid of the duplicate lines from this file using the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
440 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
441 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
442 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
443 |
command. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
444 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
445 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
446 |
$ uniq items.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
447 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
448 |
The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
449 |
The Mythical Man Month: Essays on Software Engineering |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
450 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
451 |
The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
452 |
Structure and Interpretation of Computer Programs |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
453 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
454 |
Compilers: Principles, Techniques, and Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
455 |
The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
456 |
The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
457 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
458 |
The Art of Computer Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
459 |
Introduction to Algorithms |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
460 |
The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
461 |
The Pragmatic Programmer: From Journeyman to Master |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
462 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
463 |
Unix Power Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
464 |
The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
465 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
466 |
<p id="ch10session4_a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
467 |
Nothing happens! Why? The |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
468 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
469 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
470 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
471 |
command removes duplicate lines only when they are next to each other. So, we get a sorted file from the original file and work with that file, henceforth. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
472 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
473 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
474 |
$ sort items.txt > items-sorted.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
475 |
$ uniq items-sorted.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
476 |
Compilers: Principles, Techniques, and Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
477 |
Introduction to Algorithms |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
478 |
Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
479 |
Structure and Interpretation of Computer Programs |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
480 |
The Art of Computer Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
481 |
The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
482 |
The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
483 |
The Mythical Man Month: Essays on Software Engineering |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
484 |
The Pragmatic Programmer: From Journeyman to Master |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
485 |
Unix Power Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
486 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
487 |
<p id="ch10session4_b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
488 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
489 |
uniq -u |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
490 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
491 |
command gives the lines which are unique and do not have any duplicates in the file. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
492 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
493 |
uniq -d |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
494 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
495 |
outputs only those lines which have duplicates. The |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
496 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
497 |
-c |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
498 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
499 |
option displays the number of times each line occurs in the file. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
500 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
501 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
502 |
$ uniq -u items-sorted.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
503 |
Compilers: Principles, Techniques, and Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
504 |
Introduction to Algorithms |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
505 |
Structure and Interpretation of Computer Programs |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
506 |
The Art of Computer Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
507 |
The Mythical Man Month: Essays on Software Engineering |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
508 |
The Pragmatic Programmer: From Journeyman to Master |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
509 |
Unix Power Tools |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
510 |
|
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
511 |
$ uniq -dc items-sorted.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
512 |
5 Programming Pearls |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
513 |
3 The Art of UNIX Programming |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
514 |
3 The C Programming Language |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
515 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
516 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
517 |
<div class="section" title="1.3.join"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
518 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
519 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
520 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
521 |
<h3 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
522 |
<a name="id2552862"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
523 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
524 |
1.3. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
525 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
526 |
join |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
527 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
528 |
</h3> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
529 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
530 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
531 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
532 |
<p id="ch10session4_c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
533 |
Now suppose we had the file |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
534 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
535 |
stalwarts1.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
536 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
537 |
, which lists the home pages of all the people listed in |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
538 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
539 |
stalwarts.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
540 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
541 |
. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
542 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
543 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
544 |
Richard Stallman%http://www.stallman.org |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
545 |
Eric Raymond%http://www.catb.org/~esr/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
546 |
Ian Murdock%http://ianmurdock.com/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
547 |
Lawrence Lessig%http://lessig.org |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
548 |
Linus Torvalds%http://torvalds-family.blogspot.com/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
549 |
Guido van Rossum%http://www.python.org/~guido/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
550 |
Larry Wall%http://www.wall.org/~larry/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
551 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
552 |
<p id="ch10session4_d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
553 |
It would be nice to have a single file with the information in both the files. To achieve this we use the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
554 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
555 |
join |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
556 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
557 |
command. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
558 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
559 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
560 |
$ join stalwarts.txt stalwarts1.txt -t % |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
561 |
Richard Stallman%rms%GNU Project%http://www.stallman.org |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
562 |
Eric Raymond%ESR%Jargon File%http://www.catb.org/~esr/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
563 |
Ian Murdock% %Debian%http://ianmurdock.com/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
564 |
Lawrence Lessig% %Creative Commons%http://lessig.org |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
565 |
Linus Torvalds% %Linux Kernel%http://torvalds-family.blogspot.com/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
566 |
Guido van Rossum%BDFL%Python%http://www.python.org/~guido/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
567 |
Larry Wall% %Perl%http://www.wall.org/~larry/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
568 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
569 |
<p id="ch10session4_e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
570 |
The |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
571 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
572 |
join |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
573 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
574 |
command joins the two files, based on the common field present in both the files, which is the name, in this case. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
575 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
576 |
<p id="ch10session4_f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
577 |
The |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
578 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
579 |
-t |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
580 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
581 |
option again specifies the delimiting character. Unless that is specified, join assumes that the fields are separated by spaces. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
582 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
583 |
<p id="ch10session4_10"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
584 |
Note that, for |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
585 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
586 |
join |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
587 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
588 |
to work, the common field should be in the same order in both the files. If this is not so, you could use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
589 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
590 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
591 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
592 |
, to sort the files on the common field and then join the files. In the above example, we have the common field to be the first column in both the files. If this is not the case we could use the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
593 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
594 |
-1 |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
595 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
596 |
and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
597 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
598 |
-2 |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
599 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
600 |
options to specify the field to be used for joining the files. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
601 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
602 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
603 |
$ join -2 2 stalwarts.txt stalwarts2.txt -t % |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
604 |
Richard Stallman%rms%GNU Project%http://www.stallman.org |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
605 |
Eric Raymond%ESR%Jargon File%http://www.catb.org/~esr/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
606 |
Ian Murdock% %Debian%http://ianmurdock.com/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
607 |
Lawrence Lessig% %Creative Commons%http://lessig.org |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
608 |
Linus Torvalds% %Linux Kernel%http://torvalds-family.blogspot.com/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
609 |
Guido van Rossum%BDFL%Python%http://www.python.org/~guido/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
610 |
Larry Wall% %Perl%http://www.wall.org/~larry/ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
611 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
612 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
613 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
614 |
<div class="section" title="2.Generating a word frequency list"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
615 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
616 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
617 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
618 |
<h2 class="title" style="clear: both"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
619 |
<a name="id2552962"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
620 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
621 |
2.Generating a word frequency list |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
622 |
</h2> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
623 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
624 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
625 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
626 |
<p id="ch10session4_11"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
627 |
Now, let us use the tools we have learnt to use, to generate a word frequency list of a text file. We shall use the free text of Alice in Wonderland. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
628 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
629 |
<p id="ch10session4_12"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
630 |
The basic steps to achieve this task would be - |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
631 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
632 |
<div class="orderedlist"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
633 |
<ol class="orderedlist" type="1"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
634 |
<li class="listitem"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
635 |
<p id="ch10session4_13"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
636 |
Eliminate the punctuation and spaces from the document. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
637 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
638 |
</li> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
639 |
<li class="listitem"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
640 |
<p id="ch10session4_14"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
641 |
Generate a list of words. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
642 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
643 |
</li> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
644 |
<li class="listitem"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
645 |
<p id="ch10session4_15"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
646 |
Count the words. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
647 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
648 |
</li> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
649 |
</ol> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
650 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
651 |
<p id="ch10session4_16"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
652 |
We first use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
653 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
654 |
grep |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
655 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
656 |
and some elementary |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
657 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
658 |
regex |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
659 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
660 |
to eliminate the non-alpha-characters. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
661 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
662 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
663 |
$ grep "[A-Za-z]*" alice-in-wonderland.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
664 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
665 |
<p id="ch10session4_17"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
666 |
This outputs all the lines which has any alphabetic characters on it. This isn't of much use, since we haven't done anything with the code. We only require the alphabetic characters, without any of the other junk. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
667 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
668 |
man grep |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
669 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
670 |
shows us the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
671 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
672 |
-o |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
673 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
674 |
option for outputting only the text which matches the regular expression. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
675 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
676 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
677 |
$ grep "[A-Za-z]*" -o alice-in-wonderland.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
678 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
679 |
<p id="ch10session4_18"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
680 |
Not very surprisingly, we have all the words, spit out in the form of a list! Now that we have a list of words, it is quite simple to count the occurrences of the words. You would've realized that we can make use of |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
681 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
682 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
683 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
684 |
and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
685 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
686 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
687 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
688 |
commands. We pipe the output from the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
689 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
690 |
grep |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
691 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
692 |
to the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
693 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
694 |
sort |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
695 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
696 |
and then pipe it's output to |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
697 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
698 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
699 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
700 |
. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
701 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
702 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
703 |
$ grep "[A-Za-z]*" -o alice-in-wonderland.txt | sort | uniq -c |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
704 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
705 |
<p id="ch10session4_19"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
706 |
Notice that you get the list of all words in the document in the alphabetical order, with it's frequency written next to it. But, you might have observed that Capitalized words and lower case words are being counted as different words. We therefore, replace all the Upper case characters with lower case ones, using the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
707 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
708 |
tr |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
709 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
710 |
command. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
711 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
712 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
713 |
$ grep "[A-Za-z]*" -o alice-in-wonderland.txt | tr 'A-Z' 'a-z' | sort | uniq -c |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
714 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
715 |
<p id="ch10session4_1a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
716 |
Now, it would also be nice to have the list ordered in the decreasing order of the frequency of the appearance of the words. We sort the output of the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
717 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
718 |
uniq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
719 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
720 |
command with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
721 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
722 |
-n |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
723 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
724 |
and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
725 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
726 |
-r |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
727 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
728 |
options, to get the desired output. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
729 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
730 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
731 |
$ grep "[A-Za-z]*" -o alice-in-wonderland.txt | tr 'A-Z' 'a-z' | sort | uniq -c | sort -nr |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
732 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
733 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
734 |
<div class="section" title="3.Basic editing and editors"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
735 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
736 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
737 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
738 |
<h2 class="title" style="clear: both"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
739 |
<a name="id2553109"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
740 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
741 |
3.Basic editing and editors |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
742 |
</h2> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
743 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
744 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
745 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
746 |
<div class="section" title="3.1.vim"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
747 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
748 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
749 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
750 |
<h3 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
751 |
<a name="id2553118"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
752 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
753 |
3.1.vim |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
754 |
</h3> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
755 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
756 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
757 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
758 |
<p id="ch10session4_1b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
759 |
Vim is a very powerful editor. It has a lot of commands, and all of them cannot be explained here. We shall try and look at a few, so that you can find your way around in vim. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
760 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
761 |
<p id="ch10session4_1c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
762 |
To open a file in vim, we pass the filename as a parameter to the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
763 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
764 |
vim |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
765 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
766 |
command. If a file with that filename does not exist, a new file is created. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
767 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
768 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
769 |
$ vim first.txt |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
770 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
771 |
<p id="ch10session4_1d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
772 |
To start inserting text into the new file that we have opened, we need to press the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
773 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
774 |
i |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
775 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
776 |
key. This will take us into the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
777 |
<span class="emphasis"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
778 |
<em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
779 |
insert |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
780 |
</em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
781 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
782 |
mode from the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
783 |
<span class="emphasis"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
784 |
<em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
785 |
command |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
786 |
</em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
787 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
788 |
mode. Hitting the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
789 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
790 |
esc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
791 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
792 |
key, will bring us back to the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
793 |
<span class="emphasis"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
794 |
<em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
795 |
command |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
796 |
</em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
797 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
798 |
mode. There is also another mode of vim, called the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
799 |
<span class="emphasis"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
800 |
<em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
801 |
visual |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
802 |
</em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
803 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
804 |
mode which will be discussed later in the course. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
805 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
806 |
<p id="ch10session4_1e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
807 |
In general, it is good to spend as little time as possible in the insert mode and extensively use the command mode to achieve various tasks. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
808 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
809 |
<p id="ch10session4_1f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
810 |
To save the file, use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
811 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
812 |
:w |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
813 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
814 |
in the command mode. From here on, it is understood that we are in the command mode, whenever we are issuing any command to vim. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
815 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
816 |
<p id="ch10session4_20"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
817 |
To save a file and continue editing, use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
818 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
819 |
:w FILENAME |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
820 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
821 |
The file name is optional. If you do not specify a filename, it is saved in the same file that you opened. If a file name different from the one you opened is specified, the text is saved with the new name, but you continue editing the file that you opened. The next time you save it without specifying a name, it gets saved with the name of the file that you initially opened. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
822 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
823 |
<p id="ch10session4_21"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
824 |
To save file with a new name and continue editing the new file, use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
825 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
826 |
:saveas FILENAME |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
827 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
828 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
829 |
<p id="ch10session4_22"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
830 |
To save and quit, use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
831 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
832 |
:wq |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
833 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
834 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
835 |
<p id="ch10session4_23"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
836 |
To quit, use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
837 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
838 |
:q |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
839 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
840 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
841 |
<p id="ch10session4_24"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
842 |
To quit without saving, use |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
843 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
844 |
:q! |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
845 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
846 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
847 |
<div class="section" title="3.1.1.Moving around"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
848 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
849 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
850 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
851 |
<h4 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
852 |
<a name="id2553239"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
853 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
854 |
3.1.1.Moving around |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
855 |
</h4> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
856 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
857 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
858 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
859 |
<p id="ch10session4_25"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
860 |
While you are typing in a file, it is in-convenient to keep moving your fingers from the standard position for typing to the arrow keys. Vim, therefore, provides alternate keys for moving in the document. Note again that, you should be in the command mode, when issuing any commands to vim. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
861 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
862 |
<p id="ch10session4_26"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
863 |
The basic cursor movement can be achieved using the keys, |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
864 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
865 |
h |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
866 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
867 |
(left), |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
868 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
869 |
l |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
870 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
871 |
(right), |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
872 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
873 |
k |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
874 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
875 |
(up) and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
876 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
877 |
j |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
878 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
879 |
(down). |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
880 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
881 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
882 |
^ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
883 |
k |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
884 |
< h l > |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
885 |
j |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
886 |
v |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
887 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
888 |
<p id="ch10session4_27"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
889 |
Note: Most commands can be prefixed with a number, to repeat the command. For instance, |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
890 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
891 |
10j |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
892 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
893 |
will move the cursor down 10 lines. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
894 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
895 |
<div class="section" title="3.1.1.1.Moving within a line"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
896 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
897 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
898 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
899 |
<h5 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
900 |
<a name="id2553291"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
901 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
902 |
3.1.1.1.Moving within a line |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
903 |
</h5> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
904 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
905 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
906 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
907 |
<p id="ch10session4_28"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
908 |
Cursor Movement |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
909 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
910 |
<p id="ch10session4_29"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
911 |
Command |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
912 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
913 |
<p id="ch10session4_2a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
914 |
Forward by a screenful of text |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
915 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
916 |
<p id="ch10session4_2b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
917 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
918 |
C-f |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
919 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
920 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
921 |
<p id="ch10session4_2c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
922 |
Backward by a screenful of text |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
923 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
924 |
<p id="ch10session4_2d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
925 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
926 |
C-b |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
927 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
928 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
929 |
<p id="ch10session4_2e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
930 |
Beginning of the screen |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
931 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
932 |
<p id="ch10session4_2f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
933 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
934 |
H |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
935 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
936 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
937 |
<p id="ch10session4_30"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
938 |
Middle of the screen |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
939 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
940 |
<p id="ch10session4_31"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
941 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
942 |
M |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
943 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
944 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
945 |
<p id="ch10session4_32"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
946 |
End of the screen |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
947 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
948 |
<p id="ch10session4_33"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
949 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
950 |
L |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
951 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
952 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
953 |
<p id="ch10session4_34"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
954 |
End of file |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
955 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
956 |
<p id="ch10session4_35"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
957 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
958 |
G |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
959 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
960 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
961 |
<p id="ch10session4_36"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
962 |
Line number |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
963 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
964 |
num |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
965 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
966 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
967 |
<p id="ch10session4_37"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
968 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
969 |
[num]G |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
970 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
971 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
972 |
<p id="ch10session4_38"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
973 |
Beginning of file |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
974 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
975 |
<p id="ch10session4_39"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
976 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
977 |
gg |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
978 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
979 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
980 |
<p id="ch10session4_3a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
981 |
Next occurrence of the text |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
982 |
under the cursor |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
983 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
984 |
<p id="ch10session4_3b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
985 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
986 |
* |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
987 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
988 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
989 |
<p id="ch10session4_3c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
990 |
Previous occurrence of the text |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
991 |
under the cursor |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
992 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
993 |
<p id="ch10session4_3d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
994 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
995 |
# |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
996 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
997 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
998 |
<p id="ch10session4_3e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
999 |
Note: |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1000 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1001 |
C-x |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1002 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1003 |
is |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1004 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1005 |
Ctrl |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1006 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1007 |
+ |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1008 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1009 |
x |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1010 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1011 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1012 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1013 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1014 |
<div class="section" title="3.1.2.The visual mode"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1015 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1016 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1017 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1018 |
<h4 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1019 |
<a name="id2553434"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1020 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1021 |
3.1.2.The visual mode |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1022 |
</h4> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1023 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1024 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1025 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1026 |
<p id="ch10session4_3f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1027 |
The visual mode is a special mode that is not present in the original vi editor. It allows us to highlight text and perform actions on it. All the movement commands that have been discussed till now work in the visual mode also. The editing commands that will be discussed in the future work on the visual blocks selected, too. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1028 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1029 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1030 |
<div class="section" title="3.1.3.Editing commands"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1031 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1032 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1033 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1034 |
<h4 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1035 |
<a name="id2553452"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1036 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1037 |
3.1.3.Editing commands |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1038 |
</h4> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1039 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1040 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1041 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1042 |
<p id="ch10session4_40"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1043 |
The editing commands usually take the movements as arguments. A movement is equivalent to a selection in the visual mode. The cursor is assumed to have moved over the text in between the initial and the final points of the movement. The motion or the visual block that's been highlighted can be passed as arguments to the editing commands. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1044 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1045 |
<p id="ch10session4_41"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1046 |
Editing effect |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1047 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1048 |
<p id="ch10session4_42"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1049 |
Command |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1050 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1051 |
<p id="ch10session4_43"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1052 |
Cut the character under the cursor |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1053 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1054 |
<p id="ch10session4_44"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1055 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1056 |
x |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1057 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1058 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1059 |
<p id="ch10session4_45"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1060 |
Replace the character under the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1061 |
cursor with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1062 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1063 |
a |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1064 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1065 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1066 |
<p id="ch10session4_46"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1067 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1068 |
ra |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1069 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1070 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1071 |
<p id="ch10session4_47"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1072 |
Cut an entire line |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1073 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1074 |
<p id="ch10session4_48"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1075 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1076 |
dd |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1077 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1078 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1079 |
<p id="ch10session4_49"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1080 |
Copy/yank an entire line |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1081 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1082 |
<p id="ch10session4_4a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1083 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1084 |
yy |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1085 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1086 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1087 |
<p id="ch10session4_4b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1088 |
Note: You can prefix numbers to any of the commands, to repeat them. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1089 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1090 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1091 |
<div class="section" title="3.1.4.Undo and Redo"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1092 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1093 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1094 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1095 |
<h4 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1096 |
<a name="id2553532"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1097 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1098 |
3.1.4.Undo and Redo |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1099 |
</h4> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1100 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1101 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1102 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1103 |
<p id="ch10session4_4c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1104 |
You can undo almost anything using |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1105 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1106 |
u |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1107 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1108 |
. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1109 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1110 |
<p id="ch10session4_4d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1111 |
To undo the undo command type |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1112 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1113 |
C-r |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1114 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1115 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1116 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1117 |
<div class="section" title="3.1.5.Searching and Replacing"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1118 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1119 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1120 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1121 |
<h4 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1122 |
<a name="id2553557"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1123 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1124 |
3.1.5.Searching and Replacing |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1125 |
</h4> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1126 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1127 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1128 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1129 |
<p id="ch10session4_4e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1130 |
Finding and Replacing |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1131 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1132 |
<p id="ch10session4_4f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1133 |
Command |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1134 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1135 |
<p id="ch10session4_50"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1136 |
Replace the first instance of |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1137 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1138 |
old |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1139 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1140 |
with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1141 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1142 |
new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1143 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1144 |
in the current line. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1145 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1146 |
<p id="ch10session4_51"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1147 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1148 |
:s/old/new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1149 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1150 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1151 |
<p id="ch10session4_52"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1152 |
Replace all instances of |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1153 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1154 |
old |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1155 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1156 |
with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1157 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1158 |
new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1159 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1160 |
in the current line. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1161 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1162 |
<p id="ch10session4_53"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1163 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1164 |
:s/old/new/g |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1165 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1166 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1167 |
<p id="ch10session4_54"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1168 |
Replace all instances of |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1169 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1170 |
old |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1171 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1172 |
with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1173 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1174 |
new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1175 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1176 |
in the current line, |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1177 |
but ask for confirmation each time. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1178 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1179 |
<p id="ch10session4_55"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1180 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1181 |
:s/old/new/gc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1182 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1183 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1184 |
<p id="ch10session4_56"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1185 |
Replace the first instance of |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1186 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1187 |
old |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1188 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1189 |
with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1190 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1191 |
new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1192 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1193 |
in the entire file. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1194 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1195 |
<p id="ch10session4_57"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1196 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1197 |
:%s/old/new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1198 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1199 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1200 |
<p id="ch10session4_58"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1201 |
Replace all instances of |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1202 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1203 |
old |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1204 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1205 |
with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1206 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1207 |
new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1208 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1209 |
in the entire file. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1210 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1211 |
<p id="ch10session4_59"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1212 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1213 |
:%s/old/new/g |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1214 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1215 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1216 |
<p id="ch10session4_5a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1217 |
Replace all instances of |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1218 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1219 |
old |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1220 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1221 |
with |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1222 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1223 |
new |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1224 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1225 |
in the entire file but ask |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1226 |
for confirmation each time. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1227 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1228 |
<p id="ch10session4_5b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1229 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1230 |
:%s/old/new/gc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1231 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1232 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1233 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1234 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1235 |
<div class="section" title="3.2.SciTE"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1236 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1237 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1238 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1239 |
<h3 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1240 |
<a name="id2553684"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1241 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1242 |
3.2.SciTE |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1243 |
</h3> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1244 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1245 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1246 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1247 |
<p id="ch10session4_5c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1248 |
SciTE is a |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1249 |
<span class="emphasis"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1250 |
<em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1251 |
source code |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1252 |
</em> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1253 |
</span> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1254 |
editor, that has a feel similar to the commonly used GUI text editors. It has a wide range of features that are extremely useful for a programmer, editing code. Also it aims to keep configuration simple, and the user needs to edit a text file to configure SciTE to his/her liking. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1255 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1256 |
<p id="ch10session4_5d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1257 |
Opening, Saving, Editing files with SciTE is extremely simple and trivial. Knowledge of using a text editor will suffice. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1258 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1259 |
<p id="ch10session4_5e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1260 |
SciTE can syntax highlight code in various languages. It also has auto-indentation, code-folding and other such features which are useful when editing code. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1261 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1262 |
<p id="ch10session4_5f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1263 |
SciTE also gives you the option to (compile and) run your code, from within the editor. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1264 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1265 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1266 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1267 |
<div class="section" title="4.Personalizing your Environment"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1268 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1269 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1270 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1271 |
<h2 class="title" style="clear: both"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1272 |
<a name="id2553729"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1273 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1274 |
4.Personalizing your Environment |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1275 |
</h2> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1276 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1277 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1278 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1279 |
<div class="section" title="4.1..bashrc"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1280 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1281 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1282 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1283 |
<h3 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1284 |
<a name="id2553738"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1285 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1286 |
4.1..bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1287 |
</h3> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1288 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1289 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1290 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1291 |
<p id="ch10session4_60"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1292 |
What would you do, if you want bash to execute a particular command each time you start it up? For instance, say you want the current directory to be your Desktop instead of your home folder, each time bash starts up. How would you achieve this? Bash reads and executes commands in a whole bunch of files called start-up files, when it starts up. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1293 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1294 |
<p id="ch10session4_61"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1295 |
When bash starts up as an interactive login shell, it reads the files |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1296 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1297 |
/etc/profile |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1298 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1299 |
, |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1300 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1301 |
~/.bash_profile |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1302 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1303 |
, |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1304 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1305 |
~/.bash_login |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1306 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1307 |
, and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1308 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1309 |
~/.profile |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1310 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1311 |
in that order. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1312 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1313 |
<p id="ch10session4_62"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1314 |
When it is a shell that is not a login shell, |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1315 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1316 |
~/.bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1317 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1318 |
is read and the commands in it are executed. This can be prevented using the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1319 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1320 |
--norc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1321 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1322 |
option. To force bash to use another file, instead of the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1323 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1324 |
~/.bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1325 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1326 |
file on start-up, the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1327 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1328 |
--rcfile |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1329 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1330 |
option may be used. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1331 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1332 |
<p id="ch10session4_63"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1333 |
Now, you know what you should do, to change the current directory to you Desktop. Just put a |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1334 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1335 |
cd ~/Desktop |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1336 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1337 |
into your |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1338 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1339 |
~/.bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1340 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1341 |
and you are set! |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1342 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1343 |
<p id="ch10session4_64"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1344 |
This example is quite a simple and lame one. The start-up files are used for a lot more complex things than this. You could set (or unset) aliases and a whole bunch of environment variables in the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1345 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1346 |
.bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1347 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1348 |
. We shall look at them, in the next section where we look at environment variables and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1349 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1350 |
set |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1351 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1352 |
command. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1353 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1354 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1355 |
<div class="section" title="4.2..vimrc"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1356 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1357 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1358 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1359 |
<h3 class="title"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1360 |
<a name="id2554039"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1361 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1362 |
4.2..vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1363 |
</h3> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1364 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1365 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1366 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1367 |
<p id="ch10session4_65"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1368 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1369 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1370 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1371 |
is a file similar to |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1372 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1373 |
.bashrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1374 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1375 |
for vim. It is a start-up file that vim reads and executes, each time it starts up. The options that you would like to be set every time you use vim, are placed in the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1376 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1377 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1378 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1379 |
file, so that they are automatically set each time vim starts. The recommended place for having your |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1380 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1381 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1382 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1383 |
is also your home directory. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1384 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1385 |
<p id="ch10session4_66"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1386 |
The file |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1387 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1388 |
/etc/vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1389 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1390 |
is the global config file and shouldn't usually be edited. You can instead edit the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1391 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1392 |
~/.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1393 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1394 |
file that is present in your home folder. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1395 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1396 |
<p id="ch10session4_67"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1397 |
There are a whole bunch of variables that you could set in the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1398 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1399 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1400 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1401 |
file. You can look at all the options available, using the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1402 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1403 |
:set all |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1404 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1405 |
command in vim. You could use the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1406 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1407 |
:help option_name |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1408 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1409 |
to get more information about the option that you want to set. Once you are comfortable with what you want to set a particular variable to, you could add it to |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1410 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1411 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1412 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1413 |
. You should also look at |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1414 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1415 |
:help vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1416 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1417 |
for more info on the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1418 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1419 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1420 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1421 |
file. If you already have a |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1422 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1423 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1424 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1425 |
file, you can edit it from within vim, using |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1426 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1427 |
:e $MYVIMRC |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1428 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1429 |
command. We shall look at some of the most commonly used options. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1430 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1431 |
<p id="ch10session4_68"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1432 |
Command |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1433 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1434 |
<p id="ch10session4_69"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1435 |
Vim action |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1436 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1437 |
<p id="ch10session4_6a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1438 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1439 |
set nocompatible |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1440 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1441 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1442 |
<p id="ch10session4_6b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1443 |
Explicitly disable compatibility with vi |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1444 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1445 |
<p id="ch10session4_6c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1446 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1447 |
set backspace=indent,eol,start |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1448 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1449 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1450 |
<p id="ch10session4_6d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1451 |
In the insert mode, vim allows the backspace key to delete white spaces at the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1452 |
start of line, line breaks and the character before which insert mode started. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1453 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1454 |
<p id="ch10session4_6e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1455 |
set autoindent |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1456 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1457 |
<p id="ch10session4_6f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1458 |
Vim indents a new line with the same indentation of the previous line. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1459 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1460 |
<p id="ch10session4_70"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1461 |
set backup |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1462 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1463 |
<p id="ch10session4_71"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1464 |
Vim keeps a backup copy of a file when overwriting it. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1465 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1466 |
<p id="ch10session4_72"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1467 |
set history=50 |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1468 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1469 |
<p id="ch10session4_73"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1470 |
Vim keeps 50 commands and 50 search patterns in the history. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1471 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1472 |
<p id="ch10session4_74"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1473 |
set ruler |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1474 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1475 |
<p id="ch10session4_75"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1476 |
Displays the current cursor position in the lower right corner of the vim window. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1477 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1478 |
<p id="ch10session4_76"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1479 |
set showcmd |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1480 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1481 |
<p id="ch10session4_77"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1482 |
Displays the incomplete command in the lower right corner. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1483 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1484 |
<p id="ch10session4_78"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1485 |
set incsearch |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1486 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1487 |
<p id="ch10session4_79"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1488 |
Turns on incremental searching. Displays search results while you type. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1489 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1490 |
<p id="ch10session4_7a"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1491 |
You can see the effect of the changes made to your |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1492 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1493 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1494 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1495 |
file by restarting vim. If you want to see the changes that you made to your |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1496 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1497 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1498 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1499 |
file immediately, you could source the file from within vim. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1500 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1501 |
If the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1502 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1503 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1504 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1505 |
file has been sourced when this instance of vim was started, you could just resource the file again:: |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1506 |
<p id="ch10session4_7b"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1507 |
:so $MYVIMRC |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1508 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1509 |
<p id="ch10session4_7c"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1510 |
If you just created the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1511 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1512 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1513 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1514 |
file or it was not sourced when you stared this instance of vim, just replace the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1515 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1516 |
$MYVIMRC |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1517 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1518 |
variable above, with the location of the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1519 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1520 |
.vimrc |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1521 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1522 |
file that you created/edited. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1523 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1524 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1525 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1526 |
<div class="section" title="5.Subshells and source"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1527 |
<div class="titlepage"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1528 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1529 |
<div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1530 |
<h2 class="title" style="clear: both"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1531 |
<a name="id2554257"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1532 |
</a> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1533 |
5.Subshells and |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1534 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1535 |
source |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1536 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1537 |
</h2> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1538 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1539 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1540 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1541 |
<p id="ch10session4_7d"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1542 |
A subshell is just a separate instance of the shell which is a child process of the shell that launches it. Bash creates a subshell in various circumstances. Creation of subshells allows the execution of various processes simultaneously. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1543 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1544 |
<div class="itemizedlist"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1545 |
<ul class="itemizedlist" type="*"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1546 |
<li class="listitem" style="list-style-type: *"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1547 |
<p id="ch10session4_7e"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1548 |
When an external command is executed, a new subshell is created. Any built-in commands of bash are executed with int the same shell, and no new subshell is started. When an external command is run, the bash shell copies itself (along with it's environment) creating a subshell and the process is changed to the external command executed. The subshell is a child process of this shell. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1549 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1550 |
</li> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1551 |
<li class="listitem" style="list-style-type: *"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1552 |
<p id="ch10session4_7f"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1553 |
Any pipes being used, create a subshell. The commands on the input and output ends of the pipe are run in different subshells. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1554 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1555 |
</li> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1556 |
<li class="listitem" style="list-style-type: *"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1557 |
<p id="ch10session4_80"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1558 |
You could also, explicitly tell bash to start a subshell by enclosing a list of commands between parentheses. Each of the commands in the list is executed within a single new subshell. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1559 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1560 |
</li> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1561 |
</ul> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1562 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1563 |
<p id="ch10session4_81"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1564 |
To avoid creating a subshell, when running a shell script, you could use the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1565 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1566 |
source |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1567 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1568 |
command. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1569 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1570 |
<pre class="programlisting"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1571 |
$ source script.sh |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1572 |
</pre> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1573 |
<p id="ch10session4_82"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1574 |
This will run the |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1575 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1576 |
script.sh |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1577 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1578 |
within the present shell without creating a subshell. The |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1579 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1580 |
. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1581 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1582 |
command is an alias for the source command. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1583 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1584 |
. script.sh |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1585 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1586 |
is therefore equivalent to |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1587 |
<code class="literal"> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1588 |
source script.sh |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1589 |
</code> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1590 |
. |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1591 |
</p> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1592 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1593 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1594 |
</div> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1595 |
</body> |
cb14131583c6
Started on final changes to the build scripts so that we can start with totally automatic builds
amit@thunder
parents:
diff
changeset
|
1596 |
</html> |