0% found this document useful (0 votes)
399 views56 pages

Programming Rust, 2nd Edition (Early Release) Jim Blandy PDF Download

Programming Rust, 2nd Edition is an early release book by Jim Blandy and Jason Orendorff that focuses on systems programming using the Rust language. It aims to provide clear explanations of Rust's features, particularly its ownership model, which enhances memory safety and concurrency. The book is designed for both seasoned systems programmers and experienced developers from other languages looking to learn Rust.

Uploaded by

lfbwydmn027
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
399 views56 pages

Programming Rust, 2nd Edition (Early Release) Jim Blandy PDF Download

Programming Rust, 2nd Edition is an early release book by Jim Blandy and Jason Orendorff that focuses on systems programming using the Rust language. It aims to provide clear explanations of Rust's features, particularly its ownership model, which enhances memory safety and concurrency. The book is designed for both seasoned systems programmers and experienced developers from other languages looking to learn Rust.

Uploaded by

lfbwydmn027
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Programming Rust, 2nd Edition (Early Release)

Jim Blandy pdf download

https://textbookfull.com/product/programming-rust-2nd-edition-
early-release-jim-blandy/

Download more ebook instantly today - get yours now at textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Programming Rust 1st Edition Jim Blandy

https://textbookfull.com/product/programming-rust-1st-edition-
jim-blandy/

Programming Rust Fast Safe Systems Development Jim


Blandy

https://textbookfull.com/product/programming-rust-fast-safe-
systems-development-jim-blandy/

The Rust Programming Language 2nd Edition Steve Klabnik

https://textbookfull.com/product/the-rust-programming-
language-2nd-edition-steve-klabnik/

The Rust Programming Language 2nd Edition Steve Klabnik


And Carol Nichols

https://textbookfull.com/product/the-rust-programming-
language-2nd-edition-steve-klabnik-and-carol-nichols/
The Rust Programming Language Covers Rust 2018 Steve
Klabnik

https://textbookfull.com/product/the-rust-programming-language-
covers-rust-2018-steve-klabnik/

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-
loucas/

The Rust Programming Language 1st Edition Steve Klabnik

https://textbookfull.com/product/the-rust-programming-
language-1st-edition-steve-klabnik/

Programming WebAssembly with Rust 1st Edition Kevin


Hoffman

https://textbookfull.com/product/programming-webassembly-with-
rust-1st-edition-kevin-hoffman/

Network Programming With Rust 1st Edition Abhishek


Chanda

https://textbookfull.com/product/network-programming-with-
rust-1st-edition-abhishek-chanda/
1. Preface
a. Who Should Read This Book
b. Why We Wrote This Book
c. Navigating This Book
d. Conventions Used in This Book
e. Using Code Examples
f. O’Reilly Online Learning
g. How to Contact Us
2. 1. Why Rust?
a. Type Safety

3. 2. Basic Types
a. Machine Types
i. Integer Types
ii. Checked, Wrapping, and Saturating
Arithmetic
iii. Floating-Point Types
iv. The bool Type
v. Characters
b. Tuples
c. Pointer Types

i. References
ii. Boxes
iii. Raw Pointers
d. Arrays, Vectors, and Slices
i. Arrays
ii. Vectors
iii. Slices
e. String Types

i. String Literals
ii. Byte Strings
iii. Strings in Memory
iv. String
v. Using Strings
vi. Other String-Like Types
f. Beyond the Basics
Programming Rust
SECOND EDITION

Fast, Safe Systems Development

With Early Release ebooks, you get books in their earliest form—the authors’
raw and unedited content as they write—so you can take advantage of these
technologies long before the official release of these titles.

Jim Blandy and Jason Orendorff


Programming Rust

by Jim Blandy and Jason Orendorff

Copyright © 2020 Jim Blandy, Jason Orendorff. All rights


reserved.

Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway


North, Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or


sales promotional use. Online editions are also available for
most titles (http://oreilly.com/safari). For more information,
contact our corporate/institutional sales department: 800-998-
9938 or corporate@oreilly.com.

Acquisitions Editor: Suzanne McQuade

Developmental Editor: Jeff Bleiel

Production Editor: Nan Barber

Interior Designer: David Futato

Cover Designer: Karen Montgomery

Illustrator: Rebecca Demarest


Revision History for the Second Edition Early Release
2020-02-03: First Early Release

See http://oreilly.com/catalog/errata.csp?
isbn=9781492052593 for release details.

The O’Reilly logo is a registered trademark of O’Reilly Media,


Inc. Programming Rust, the cover image, and related trade
dress are trademarks of O’Reilly Media, Inc.

The views expressed in this work are those of the authors, and
do not represent the publisher’s views. While the publisher and
the authors have used good faith efforts to ensure that the
information and instructions contained in this work are
accurate, the publisher and the authors disclaim all
responsibility for errors or omissions, including without
limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and
instructions contained in this work is at your own risk. If any
code samples or other technology this work contains or
describes is subject to open source licenses or the intellectual
property rights of others, it is your responsibility to ensure that
your use thereof complies with such licenses and/or rights.

978-1-492-05259-3

[LSI]
Preface
Rust is a language for systems programming.

This bears some explanation these days, as systems


programming is unfamiliar to most working programmers. Yet
it underlies everything we do.

You close your laptop. The operating system detects this,


suspends all the running programs, turns off the screen, and
puts the computer to sleep. Later, you open the laptop: the
screen and other components are powered up again, and each
program is able to pick up where it left off. We take this for
granted. But systems programmers wrote a lot of code to
make that happen.

Systems programming is for:

Operating systems

Device drivers of all kinds

Filesystems

Databases
Code that runs in very cheap devices, or devices that
must be extremely reliable

Cryptography

Media codecs (software for reading and writing audio,


video, and image files)

Media processing (for example, speech recognition or


photo editing software)

Memory management (for example, implementing a


garbage collector)

Text rendering (the conversion of text and fonts into


pixels)

Implementing higher-level programming languages


(like JavaScript and Python)

Networking

Virtualization and software containers

Scientific simulations

Games

In short, systems programming is resource-constrained


programming. It is programming when every byte and every
CPU cycle counts.

The amount of systems code involved in supporting a basic


app is staggering.

This book will not teach you systems programming. In fact,


this book covers many details of memory management that
might seem unnecessarily abstruse at first, if you haven’t
already done some systems programming on your own. But if
you are a seasoned systems programmer, you’ll find that Rust
is something exceptional: a new tool that eliminates major,
well-understood problems that have plagued a whole industry
for decades.

Who Should Read This Book


If you’re already a systems programmer, and you’re ready for
an alternative to C++, this book is for you. If you’re an
experienced developer in any programming language, whether
that’s C#, Java, Python, JavaScript, or something else, this
book is for you too.

However, you don’t just need to learn Rust. To get the most
out of the language, you also need to gain some experience
with systems programming. We recommend reading this book
while also implementing some systems programming side
projects in Rust. Build something you’ve never built before,
something that takes advantage of Rust’s speed, concurrency,
and safety. The list of topics at the beginning of this preface
should give you some ideas.

Why We Wrote This Book


We set out to write the book we wished we had when we
started learning Rust. Our goal was to tackle the big, new
concepts in Rust up front and head-on, presenting them clearly
and in depth so as to minimize learning by trial and error.

Navigating This Book


The first two chapters of this book introduce Rust and provide
a brief tour before we move on to the fundamental data types
in Chapter 3. Chapters 4 and 5 address the core concepts of
ownership and references. We recommend reading these first
five chapters through in order.

Chapters 6 through 10 cover the basics of the language:


expressions (Chapter 6), error handling (Chapter 7), crates and
modules (Chapter 8), structs (Chapter 9), and enums and
patterns (Chapter 10). It’s all right to skim a little here, but
don’t skip the chapter on error handling. Trust us.

Chapter 11 covers traits and generics, the last two big


concepts you need to know. Traits are like interfaces in Java or
C#. They’re also the main way Rust supports integrating your
types into the language itself. Chapter 12 shows how traits
support operator overloading, and Chapter 13 covers many
more utility traits.

Understanding traits and generics unlocks the rest of the book.


Closures and iterators, two key power tools that you won’t
want to miss, are covered in Chapters 14 and 15, respectively.
You can read the remaining chapters in any order, or just dip
into them as needed. They cover the rest of the language:
collections (Chapter 16), strings and text (Chapter 17), input
and output (Chapter 18), concurrency (Chapter 20), macros
(Chapter 21), and unsafe code (Chapter 22).

Conventions Used in This Book


The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and


file extensions.

Constant width

Used for program listings, as well as within paragraphs to


refer to program elements such as variable or function
names, databases, data types, environment variables,
statements, and keywords.

Constant width bold


Shows commands or other text that should be typed
literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied


values or by values determined by context.

TIP
This icon signifies a tip or suggestion.

NOTE
This icon signifies a general note.

WARNING
This icon indicates a warning or caution.

Using Code Examples


Supplemental material (code examples, exercises, etc.) is
available for download at
https://github.com/ProgrammingRust.
This book is here to help you get your job done. In general, if
example code is offered with this book, you may use it in your
programs and documentation. You do not need to contact us
for permission unless you’re reproducing a significant portion
of the code. For example, writing a program that uses several
chunks of code from this book does not require permission.
Selling or distributing a CD-ROM of examples from O’Reilly
books does require permission. Answering a question by citing
this book and quoting example code does not require
permission. Incorporating a significant amount of example
code from this book into your product’s documentation does
require permission.

We appreciate, but do not require, attribution. An attribution


usually includes the title, author, publisher, and ISBN. For
example: “Programming Rust, Second Edition by Jim Blandy
and Jason Orendorff (O’Reilly). Copyright 2021 Jim Blandy and
Jason Orendorff, 978-1-492-05259-3.”

If you feel your use of code examples falls outside fair use or
the permission given above, feel free to contact us at
permissions@oreilly.com.
O’Reilly Online Learning

NOTE
For more than 40 years, O’Reilly Media has provided technology
and business training, knowledge, and insight to help companies
succeed.

Our unique network of experts and innovators share their


knowledge and expertise through books, articles, conferences,
and our online learning platform. O’Reilly’s online learning
platform gives you on-demand access to live training courses,
in-depth learning paths, interactive coding environments, and a
vast collection of text and video from O’Reilly and 200+ other
publishers. For more information, please visit
http://oreilly.com.

How to Contact Us
Please address comments and questions concerning this book
to the publisher:

O’Reilly Media, Inc.

1005 Gravenstein Highway North

Sebastopol, CA 95472

800-998-9938 (in the United States or Canada)


707-829-0515 (international or local)

707-829-0104 (fax)

We have a web page for this book, where we list errata,


examples, and any additional information. You can access this
page at https://oreil.ly/xxxxxx.

Email bookquestions@oreilly.com to comment or ask technical


questions about this book.

For more information about our books, courses, conferences,


and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia


Chapter 1. Why Rust?
A NOTE FOR EARLY RELEASE READERS
With Early Release ebooks, you get books in their earliest form—the author’s raw and unedited
content as they write—so you can take advantage of these technologies long before the official
release of these titles.

This will be the 1st chapter of the final book. Please note that the GitHub repo will be made
active later on.

If you have comments about how we might improve the content and/or examples in this book,
or if you notice missing material within this chapter, please reach out to the author at
programming-rust@red-bean.com.

In certain contexts—for example the context Rust is


targeting—being 10x or even 2x faster than the competition
is a make-or-break thing. It decides the fate of a system in
the market, as much as it would in the hardware market.
—Graydon Hoare

All computers are now parallel...


Parallel programming is programming.
—Michael McCool et al., Structured Parallel
Programming
TrueType parser flaw
used by nation-state attacker for surveillance;
all software is security-sensitive.
—Andy Wingo

Systems programming languages have come a long way in the


50 years since we started using high-level languages to write
operating systems, but two problems in particular have proven
difficult to crack:

It’s difficult to write secure code. It’s especially difficult


to manage memory correctly in C and C++. Users have
been suffering with the consequences for decades, in
the form of security holes dating back at least as far as
the 1988 Morris worm.

It’s very difficult to write multithreaded code, which is


the only way to exploit the abilities of modern
machines. Even experienced programmers approach
threaded code with caution: concurrency can introduce
broad new classes of bugs and make ordinary bugs
much harder to reproduce.

Enter Rust: a safe, concurrent language with the performance


of C and C++.

Rust is a new systems programming language developed by


Mozilla and a community of contributors. Like C and C++, Rust
gives developers fine control over the use of memory, and
maintains a close relationship between the primitive operations
of the language and those of the machines it runs on, helping
developers anticipate their code’s costs. Rust shares the
ambitions Bjarne Stroustrup articulates for C‍++ in his paper
“Abstraction and the C++ Machine Model:”

In general, C++ implementations obey the zero-overhead


principle: What you don’t use, you don’t pay for. And further:
What you do use, you couldn’t hand code any better.

To these Rust adds its own goals of memory safety and


trustworthy concurrency.

The key to meeting all these promises is Rust’s novel system of


ownership, moves, and borrows, checked at compile time and
carefully designed to complement Rust’s flexible static type
system. The ownership system establishes a clear lifetime for
each value, making garbage collection unnecessary in the core
language, and enabling sound but flexible interfaces for
managing other sorts of resources like sockets and file
handles. Moves transfer values from one owner to another, and
borrowing lets code use a value temporarily without affecting
its ownership. Since many programmers will have never
encountered these features in this form before, we explain
them in detail in later chapters.

These same ownership rules also form the foundation of Rust’s


trustworthy concurrency model. Most languages leave the
relationship between a mutex and the data it’s meant to
protect to the comments; Rust can actually check at compile
time that your code locks the mutex while it accesses the data.
Most languages admonish you to be sure not to use a data
structure yourself after you’ve given it to another thread; Rust
checks that you don’t. Rust is able to prevent data races at
compile time.

Rust is not really an object-oriented language, although it has


some object-oriented characteristics. Rust is not a functional
language, although it does tend to make the influences on a
computation’s result more explicit, as functional languages do.
Rust resembles C and C++ to an extent, but many idioms from
those languages don’t apply, so typical Rust code does not
deeply resemble C or C++ code. It’s probably best to reserve
judgement about what sort of language Rust is, and see what
you think once you’ve become comfortable with the language.

To get feedback on the design in a real-world setting, Mozilla


has developed Servo, a new web browser engine, in Rust.
Servo’s needs and Rust’s goals are well matched: a browser
must perform well and handle untrusted data securely. Servo
uses Rust’s safe concurrency to put the full machine to work on
tasks that would be impractical to parallelize in C or C++. In
fact, Servo and Rust have grown up together, with Servo using
the latest new language features, and Rust evolving based on
feedback from Servo’s developers.
Type Safety
Rust is a type-safe language. But what do we mean by “type
safety”? Safety sounds good, but what exactly are we being
kept safe from?

Here’s the definition of undefined behavior from the 1999


standard for the C programming language, known as C99:

undefined behavior

behavior, upon use of a nonportable or erroneous


program construct or of erroneous data, for which this
International Standard imposes no requirements

Consider the following C program:

int main(int argc, char **argv) {


unsigned long a[1];
a[3] = 0x7ffff7b36cebUL;
return 0;
}

According to C99, because this program accesses an element


off the end of the array a, its behavior is undefined, meaning
that it can do anything whatsoever. When we ran this program
on Jim’s laptop, it produced the following output:

undef: Error: .netrc file is readable by others.


undef: Remove password or make file unreadable by
others.

Then it crashed. Jim’s laptop doesn’t even have a .netrc file. If


you try it yourself, it will probably do something entirely
different.

The machine code the C compiler generated for this main


function happens to place the array a on the stack three words
before the return address, so storing 0x7ffff7b36cebUL in
a[3] changes poor main’s return address to point into the
midst of code in the C standard library that consults one’s
.netrc file for a password. When main returns, execution
resumes not in main’s caller, but at the machine code for these
lines from the library:

warnx(_("Error: .netrc file is readable by


others."));
warnx(_("Remove password or make file unreadable
by others."));
goto bad;
In allowing an array reference to affect the behavior of a
subsequent return statement, the C compiler is fully
standards-compliant. An undefined operation doesn’t just
produce an unspecified result: it is allowed to cause the
program to do anything at all.

The C99 standard grants the compiler this carte blanche to


allow it to generate faster code. Rather than making the
compiler responsible for detecting and handling odd behavior
like running off the end of an array, the standard makes the
programmer responsible for ensuring those conditions never
arise in the first place.

Empirically speaking, we’re not very good at that. While a


student at the University of Utah, researcher Peng Li modified
C and C++ compilers to make the programs they translated
report when they executed certain forms of undefined
behavior. He found that nearly all programs do, including those
from well-respected projects that hold their code to high
standards. And undefined behavior often leads to exploitable
security holes in practice. The Morris worm propagated itself
from one machine to another using an elaboration of the
technique shown before, and this kind of exploit remains in
widespread use today.

In light of that example, let’s define some terms. If a program


has been written so that no possible execution can exhibit
undefined behavior, we say that program is well defined. If a
language’s safety checks ensure that every program is well
defined, we say that language is type safe.

A carefully written C or C++ program might be well defined,


but C and C++ are not type safe: the program shown earlier
has no type errors, yet exhibits undefined behavior. By
contrast, Python is type safe. Python is willing to spend
processor time to detect and handle out-of-range array indices
in a friendlier fashion than C:

>>> a = [0]
>>> a[3] = 0x7ffff7b36ceb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list assignment index out of range
>>>

Python raised an exception, which is not undefined behavior:


the Python documentation specifies that the assignment to
a[3] should raise an IndexError exception, as we saw.
Certainly, a module like ctypes that provides unconstrained
access to the machine can introduce undefined behavior into
Python, but the core language itself is type safe. Java,
JavaScript, Ruby, and Haskell are similar in this way.

Note that being type safe is independent of whether a


language checks types at compile time or at run time: C checks
at compile time, and is not type safe; Python checks at run
time, and is type safe.

It is ironic that the dominant systems programming languages,


C and C++, are not type safe, while most other popular
languages are. Given that C and C++ are meant to be used to
implement the foundations of a system, entrusted with
implementing security boundaries and placed in contact with
untrusted data, type safety would seem like an especially
valuable quality for them to have.

This is the decades-old tension Rust aims to resolve: it is both


type safe and a systems programming language. Rust is
designed for implementing those fundamental system layers
that require performance and fine-grained control over
resources, yet still guarantees the basic level of predictability
that type safety provides. We’ll look at how Rust manages this
unification in more detail in later parts of this book.

Rust’s particular form of type safety has surprising


consequences for multithreaded programming. Concurrency is
notoriously difficult to use correctly in C and C++; developers
usually turn to concurrency only when single-threaded code
has proven unable to achieve the performance they need. But
Rust guarantees that concurrent code is free of data races,
catching any misuse of mutexes or other synchronization
primitives at compile time. In Rust, you can use concurrency
without worrying that you’ve made your code impossible for
any but the most accomplished programmers to work on.
Rust has an escape valve from the safety rules, for when you
absolutely have to use a raw pointer. This is called unsafe
code, and while most Rust programs don’t need it, we’ll show
how to use it and how it fits into Rust’s overall safety scheme
in Chapter 22.

Like those of other statically typed languages, Rust’s types can


do much more than simply prevent undefined behavior. An
accomplished Rust programmer uses types to ensure values
are used not just safely but meaningfully, in a way that’s
consistent with the application’s intent. In particular, Rust’s
traits and generics, described in a later chapter, provide a
succinct, flexible, and performant way to describe
characteristics that a group of types has in common, and then
take advantage of those commonalities.

Our aim in this book is to give you the insights you need not
just to write programs in Rust, but to put the language to work
ensuring that those programs are both safe and correct, and to
anticipate how they will perform. In our experience, Rust is a
major step forward in systems programming, and we want to
help you take advantage of it.
Chapter 2. Basic Types
A NOTE FOR EARLY RELEASE READERS
With Early Release ebooks, you get books in their earliest form—the author’s raw and unedited
content as they write—so you can take advantage of these technologies long before the official
release of these titles.

This will be the 3rd chapter of the final book. Please note that the GitHub repo will be made
active later on.

If you have comments about how we might improve the content and/or examples in this book,
or if you notice missing material within this chapter, please reach out to the author at
programming-rust@red-bean.com.

There are many, many types of books in the world, which


makes good sense, because there are many, many types of
people, and everybody wants to read something different.
— Lemony Snicket

To a great extent, the Rust language is designed around its


types. Its memory and thread safety guarantees rest on the
soundness of its type system. Its flexibility stems from its
generic types and traits. And its performance arises from
letting developers choose representations for their data with
the right balance between flexibility and cost.

This chapter is about that third aspect: Rust’s fundamental


types for representing values. These source-level types have
Another Random Scribd Document
with Unrelated Content
The text on this page is estimated to be only 28.13%
accurate

CIUDAD RODRIGO. 307 tains, and will prevent any person


or parties crossing from this side. It is of the highest importance that
no intelligence of the movements of the army should be sent either
by the garrison of Ciudad or by the peasantry to Salamanca. When
his provisions are exhausted, he is authorized to hire carts and send
in to the army round Ciudad, but, if possible, he should obtain
supplies from the country near him, and is authorized to purchase
provisions and to send in accounts and vouchers for such purchases
to the paymaster's department. "Hurrah, Ryan," he exclaimed on
reading the order, "things are going to move at last! This means, of
course, that the army is going to besiege Ciudad at once, and that
we are to prevent the French from getting any news of it until it is
too late for them to relieve it. For the last month guns and
ammunition have been arriving at Almeida, and I thought that this
weary time of waiting was drawing to an end." "I am glad indeed,
Terence. I must say that I was afraid that we should not be moving
until the spring. Shall we go in and say good-bye to our fellows?"
"Yes, we may as well; but mind, don't say where we are going to,
only that we are ordered away. I don't suppose that the regiments
will know anything about it till within an hour of the time they
march. There can be no doubt that it is a serious business. Ciudad
held out for weeks against Massena, and with Marmont within a few
days' march, with an army at least as strong as ours, it will be a
tough business, indeed, to take it before he can come up to its
relief; and I can well understand that it is all-important that he shall
know nothing about the siege till it is too late for him to arrive in
time." "We have come in to say good-bye, colonel," Terence said as
he and Ryan entered the mess-room of the Mayo Fusiliers that
evening. "And where are you off to, O'Connor 1" " Well, sir, I don't
mind mentioning it in here, but it must
The text on this page is estimated to be only 28.62%
accurate

308 UNDER WELLINGTON'S COMMAND. go no further. The


chief, knowing what we are capable of, proposes that I shall make a
rapid march to Madrid, seize the city, and bring King Joseph back a
prisoner." There was a roar of laughter. " Terence, my boy," Captain
O'Grady said, " that is hardly a mission worthy of a fighting man like
yourself. I expect that you are hiding something from us, and that
the real idea is that you should traverse Spain and France, enter
Germany, and seize Boney, and carry him off with you to England." "
I dare not tell you whether you are right or not, O'Grady. Things of
this sort must not even be whispered about. It is a wonderfully good
guess that you have made, and when it is all over you will be able to
take credit for having divined what was up, but for mercy's sake
don't talk about it. Keep as silent as the grave, and if anyone should
ask you what has become of us, pretend that you know nothing
about it." "But you are going, O'Connor?" the colonel said, when the
laughter had subsided. "Yes, colonel. We march to-morrow morning.
I daresay you will hear of us before many days are over, and may
perhaps be able to make even a closer guess than O'Grady, as to
what we are doing. I am heartily glad that we are off; we are now at
our full strength again, most of the wounded have rejoined, and I
could have filled up the vacancies a dozen times over. The
Portuguese know that I always manage to get food for my men
somehow, which is more than can be said for the other Portuguese
regiments, though those of Trant and Pack are better off than
Beresford's regulars. Then, too, I think they like fighting now that
they feel that they are a match for the French, man for man. They
get a fair share of it at anyrate. The three months that we have
been idle have been useful, as the new recruits know their work as
well as the others." "Then you don't know how much longer we are
going to stop in this bastely hole?" O'Grady asked.
The text on this page is estimated to be only 28.58%
accurate

CIUDAD RODRIGO. 309 "Well, I will tell you this much,


O'Grady; I fancy that before this day week you will all have work to
do, and that it is likely to be hot." " That is a comfort, Terence. But,
my dear boy, have a little pity on us and don't finish off the business
by yourselves. Eemember that we have come a long way, and that it
will be mighty hard for us if you were to clear the French out of
Spain and leave nothing for us to do but to bury their dead and
escort their army as prisoners to the port." "I will bear it in mind,
O'Grady; but don't you forget the past. You know how desperately
you grumbled at Rolica because the regiment was not in it, and how
you got your wish at Vimiera, and lost an arm in consequence; so,
even if I do, as you say, push the French out of Spain, you will have
the consolation of knowing that you will be able to go back to
Ireland without leaving any more pieces of you behind." "There is
something in that, Terence," O'Grady said gravely. " I think that
when this is over I shall go on halfpay, and there may as well be as
much of me left as possible to enjoy it. It's an ungrateful country I
am serving. In spite of all that I have done for it, and the loss of my
arm into the bargain, here am I, still a captain, though may be I am
near the top of the list; still, it is but a captain I am, and here are
two gossoons like yourself and Dick Eyan, the one of you marching
about a field-officer and the other a captain. It is heart-breaking
entirely, and me one of the most zealous officers in the service. But
it is never any luck I have had from the day I was born." " It will
come some day, never fear, O'Grady, and perhaps it may not be so
far off as you fear. " Well, colonel, we will just take a glass with you
for luck and then say good-night, for I have a good many things to
see after, and must be up very early so as to get our tents packed
and handed over, to draw our rations, eat our breakfast, and be off
by seven."
The text on this page is estimated to be only 28.80%
accurate

3.0 UNDER WELLINGTON'S COMMAND. It was close upon


that hour when the regiment marched. It was known that there
were no French troops west of the Huebra, but after fording the
Aqueda the force halted until nightfall, and then moved forward and
reached the Huebra at midnight, lay down to sleep until daybreak,
and then extended along the bank of the Yeltes as far as its source
among the mountains, thus cutting the roads from Ciudad to
Salamanca and the North. The distance to be watched was some
twenty miles, but as the river was in many places unfordable it was
necessary only to place patrols here, while strong parties were
posted, not only on the main roads, but at all points where by-roads
or peasants' tracks led down to the bank. On that day a bridge was
thrown across the Aqueda six miles below Ciudad for the passage of
artillery, but owing to the difficulties of carriage it was five days later
before the artillery and ammunition could be brought over, and this
was only done by the aid of 800 carts, which Wellington had caused
to be quietly constructed during the preceding three months. On the
8th the light division and Pack's Portuguese contingent forded the
Aqueda three miles above Ciudad, and, making a long detour, took
up their position behind a hill called the Great Teson. They remained
quiet during the day, and the garrison, believing that they had only
arrived to enable the force that had long blockaded the town to
render the investment more complete, no measures of defence were
taken ; but at night the light division fell suddenly on the redoubt of
San Francisco on the Great Teson. The assault was completely
successful. The garrison was a small one, and had not been
reinforced. A few of them were killed, and the remainder taken, with
a loss to the assailants of only twenty-four men and officers. A
Portuguese regiment, commanded by Colonel Elder, then set to
work, and these, in spite of a heavy fire kept up all night by the
French forts, completed a parallel 600 yards in length before day
broke.
The text on this page is estimated to be only 28.62%
accurate

THE SACK OF A CITY. 311 CHAPTER XVIII. THE SACK OF A


CITY. FR the next four days the troops worked night and day, the
operations being carried on under a tremendous fire from the French
batteries. The trenches being carried along the whole line of the
Small Teson, on the night of the 13th the convent of Santa Cruz was
captured, and on the 14th the batteries opened fire against the
town, and before morning the 40th regiment carried the convent of
San Francisco, and thus established itself within the suburb, which
was inclosed by an entrenchment that the Spanish had thrown up
there during the last siege. The French artillery was very powerful,
and at times overpowered that of the besiegers. Some gallant sorties
were also made, but, by the 19th, two breaches were effected in the
ramparts, and preparations were made for an assault. That evening
Terence received an order to march at once to the place and to join
Pack's Portuguese. The assault was to be made by the 3rd and light
divisions, aided by Pack's command, and Colonel O'Toole's
Portuguese riflemen. The main British army lay along the Coa in
readiness to advance at once and give battle should Marmont come
up to the assistance of the besieged town. On the 19th both the
breaches were pronounced practicable, and during the day the guns
of the besiegers were directed against the artillery on the ramparts,
while the storming parties prepared for their work. The third division
was to attack the great breach; the light division was to make for
the small breach; and upon entering the inclosure known as the
fcntsse braye, a portion were to turn and enter the town by the
Salamanca gate, while the others were to penetrate by the breach.
Colonel O'Toole, with his Portuguese, was to cross the river and to
aid the right attack, while Pack's Portuguese were to make a false
attack on the San Jago gate on the other side of
The text on this page is estimated to be only 28.92%
accurate

312 UNDER WELLINGTON'S COMMAND. the town, and to


convert this into a real assault if the defence should prove feeble.
The French scarcely appeared conscious that the critical moment
was at hand, but they had raised breastworks along the tops of both
breaches and were perfectly prepared for the assault. When the
signal was given, the attack was begun on the right. The 5th, 77th,
and 94th Regiments rushed from the convent of Santa Cruz, leapt
down into the fausse braye, and made their way to the foot of the
great breach, which they reached at the same moment as the rest of
the third division, who had run down from the Small Teson. A
terrible fire was opened upon them, but, undismayed by shell,
grape, and musketry from the ramparts and houses, they drove the
French behind their new work. Here, however, the enemy stood so
stoutly that no progress could be made; unable to cross the
obstacle, the troops nevertheless maintained their position, although
suffering terrible losses from the French fire. Equally furious was the
attack on the small breach by the light division. After a few minutes'
fighting they succeeded in bursting through the ranks of the
defenders, and then, turning to the right, fought their way along the
ramparts until they reached the top of the great breach. The French
there wavered on finding that their flank was turned, and the third
division, seizing the opportunity, hurled themselves upon them, and
this breach was also won. O'Toole's attack was successful; and on
the other side of the town, Pack's Portuguese, meeting with no
resistance, had blown open the gate of San Jago, and had also
entered the town. Here a terrible scene took place, and the British
troops sullied their victory by the wildest and most horrible excesses.
They had neither forgotten nor forgiven the treatment they had
experienced at the hands of the Spanish, both before and after the
battle of Talavera, when they were almost starved, while the
Spaniards had abundant supplies, and yet left the British wounded
unattended to die of starvation in the hospitals
The text on this page is estimated to be only 28.71%
accurate

THE SACK OF A CITY. 313 when they evacuated the city.


From that time their animosity against the Spaniards had been vastly
greater than their feeling against the French, who had always
behaved as gallant enemies, and had treated their wounded and
prisoners with the greatest kindness. Now this long-pent-up feeling
burst out, and murder, rapine, and violence of all sorts raged for
some hours wholly without check. Officers who endeavoured to
protect the hapless inhabitants were shot down, all commands were
unheeded, and abominable atrocities were perpetrated. Some share
of the blame rests with Wellington and his staff, who had taken no
measures whatever for maintaining order in the town when
possession should be gained of it, a provision which should never be
omitted in the case of an assault. The Portuguese, whose animosity
against the Spaniards was equally bitter, imitated the example of
their British comrades. Fires broke out in several places, which
added to the horror of the scene. The castle was still held by the
French, the troops having retreated there as soon as the breach had
been carried. There was not, therefore, even the excuse of the
excitement of street fighting to be made for the conduct of the
victors. In vain Terence and his officers endeavoured to keep their
men together. By threes and fours these scattered down the side
streets, to join the searchers for plunder, until at last he remained
alone with his British and Portuguese officers. " This is horrible," he
said to Ryan, as the shouts, shrieks, and screams told that the work
of murder as well as plunder was being carried on. "It is evident
that, single-handed, nothing can be done. I propose that we divide
into two parties, and take these two houses standing together under
our protection. We will have two English officers with each, as there
is no chance of the soldiers listening to a Portuguese officer. How
many are there of us1?" There were the twelve captains and twenty
subalterns. "Bull and Macwitty, do you take half of them; Colonel
The text on this page is estimated to be only 28.52%
accurate

314 UNDER WELLINGTON'S COMMAND. Herrara, Eyan, and


I will take the other half. When you have once obtained admission,
barricade the door and lower windows with furniture. When the
rioters arrive show yourselves at the windows, and say that you
have orders to protect the houses from insult, and if any attack is
made you will carry out your orders at whatever cost. When they
see four British officers at the windows they will suppose that special
instructions have been given us with respect to these two houses. If
they attack we must each defend ourselves to the last, holding the
stairs if they break in. If only our house is attacked, come with half
your force to our assistance, and we will do the same to you. We
can get along by those balconies without coming down into the
street." The force was at once divided. Terence knocked at the door
of one house, and his majors at that of the other. No answer was
received, but as they continued to knock with such violence that it
seemed as if they were about to break down the doors, these were
presently opened. Terence entered. A Spanish gentleman, behind
whom stood a number of trembling servants, advanced. " What
would you have, senor ?" he asked. " I see that you are an officer.
Surely you cannot menace with violence those who are your allies?"
" You are right, senor; but unfortunately our troops have shaken off
all discipline, and are pillaging and, I am afraid, murdering. The men
of my own regiment have joined the rest, and I with my officers,
finding ourselves powerless, have resolved at least to protect your
mansion and the next from our maddened troops. I can give you my
word of honour that I and these gentlemen, who are all my officers,
have come as friends, and are determined to defend until the last
your mansion, which happened to be the first we came to. A similar
party is taking charge of the next house, and if necessary we can
join forces." " I thank you indeed, sir. I am the Count de Montego. I
have my wife and daughters here, and in their name as well as
The text on this page is estimated to be only 28.70%
accurate

THE SACK OF A CITY. 315 my own I thank you most


cordially. I have some twenty men, sir. Alone we could do nothing,
but they will aid you in every way, if you will but give orders." " In
the first place, count, we will move as many articles of heavy
furniture as possible against the doors. I see that your lower
windows are all barred. We had better place mattresses behind them
to prevent shot from penetrating. I hope, however, that it will not
come to that, and that I shall be able to persuade any that may
come along that these houses are under special protection." The
count at once ordered his servants to carry out the British officer's
instructions, and the whole party were soon engaged in piling heavy
furniture against the door. The count had gone up to allay the fears
of his wife and daughters, who, with the female servants, were
gathered in terrible anxiety in the drawing-room above. As soon as
the preparations were completed, Terence, Ryan, and Herrara went
upstairs, and after being introduced to the ladies, who were now to
some extent reassured, Terence went out on to the balcony with
Ryan, leaving Herrara in the drawing-room, as he thought it was
best that only British officers should show themselves. Terrible as
the scene had been before, it was even worse now. The soldiers had
everywhere broken into the cellars, and numbers of them were
already drunk, many discharged their muskets recklessly, some
quarrelled among themselves as to the spoil they had taken, and
fierce fights occurred. In two or three minutes Bull and Macwitty
appeared on the balcony of the next house. "I see it is too far to get
across," Terence said. "If you cannot find a plank, set half a dozen
men to prise up a couple from the floor." Presently a number of
soldiers came running along down the street. "Here are two big
houses," one shouted. "There ought to be plenty of plunder here."
The text on this page is estimated to be only 28.82%
accurate

316 UNDER WELLINGTON'S COMMAND. "Halt!" Terence


shouted. "These houses are under special protection, and, as you
see, I myself and three other British officers are placed here to see
that no one enters. I have a strong force under my orders, and
anyone attempting to break down the doors will be shot instantly,
and all who aid him will be subsequently tried and hung." The men,
on seeing the four British officers, three of them in the dress of field-
officers, and one, the speaker, in the uniform of the staff, at once
drew back. "Come on, mates," one said as they stood indecisive;
"we shall only lose time here, while others are getting as much
plunder as they can carry. Let us go on." But as the wine took effect,
others who came along were less disposed to listen to orders.
Gradually gathering until they were in considerable numbers, several
shots were fired at the officers, and one man, advancing up the
steps, began to hammer at the door with the butt end of his musket.
Terence leaned over the balcony, and drawing his pistol and taking a
steady aim, fired, and the man fell with a sharp cry. A number of
shots were fired from below, but the men were too unsteady to take
aim, and Terence was uninjured. Again he stood up. "Men," he
shouted, "you have shown yourselves to be brave soldiers to-day.
Are you now going to disgrace yourselves by mutiny against officers
who are doing their duty, thereby running the risk of being tried and
hung 1 I tell you again that these houses are both defended by a
strong force, and that we shall protect them at all hazard. Go
elsewhere, where booty is to be more easily obtained." His words,
however, were unheeded. Some more shots were fired, and then
there was a general rush at the doors, while another party attacked
that of the next house. The officers were all provided with pistols,
and Terence hurried below with Ryan. "Do not fire," he said to the
others, "until they break down
The text on this page is estimated to be only 28.62%
accurate

THE SACK OF A CITY. 317 the door. It will take them some
time, and at any moment fresh troops may be marched in to restore
order." The door was a strong one, and, backed as it was, it resisted
for a considerable time. Those who first attacked it speedily broke
the stocks of their guns, and had to make way for others. Presently
the attack ceased suddenly. " Run upstairs, Dicky, and see what they
are doing, and how things are going on next door." Ryan soon
returned. " They are bringing furniture and a lot of straw from
houses opposite; they have broken down the next door, but they
have not got in yet." " Let the servants at once set to work to draw
pails of water from the well in the court-yard, and carry them
upstairs. Ryan, you had better go into the next house and see if they
are pressed. Tell them that they must hold out without my help for a
short time. I am going to send six officers out by the back of the
house to collect some of our men together. Another will be in
readiness to open the back-door as soon as they return. I shall keep
them from firing the pile as long as I can. The count has two double-
barrelled guns ; I don't want to use them if I can help it, but they
shall not get in hore. Bo you stop, and help next door. There can be
no fighting here yet, for if they do burn the door it will be a long
time before they can get in." The native officers started at once.
They were of opinion that they would soon be able to bring in a
good many of their men, for the Portuguese are ^a sober race, and
few would have got intoxicated. Most of the men would soon find
that there was not much booty to be obtained, and that even what
they got would probably be snatched from them by the English
soldiers, and would consequently be glad to return to their duty
again. An officer took his place at the back-door in readiness to
remove the bars, another went up with Terence to the first floor, and
the remainder stopped in the hall with six of
The text on this page is estimated to be only 28.76%
accurate

318 UNDER WELLINGTON'S COMMAND. the men-servants.


Terence went upstairs and looked down into the street. There was a
lot of furniture with bundles of faggots and straw piled there. "
Now," he said to the officer, " empty these pails at once ; the
servants will soon bring some more up. I will stand here with these
guns and fire at any one who interferes with you. Just come out into
the balcony, empty your pails over, and go back at once. You need
scarcely show yourself, and there is not much chance of your being
hit by those drunken rascals." Yells and shouts of rage were heard
below as the water was thrown over. As fast as the pails were
emptied the servants carried them off and refilled them. At last two
soldiers appeared from a house opposite with blazing torches. The
guns had been loaded by the count with small-shot, as Terence was
anxious not to take life. As soon as the two men appeared he raised
the fowling-piece to his shoulder and fired both barrels in quick
succession. With a yell of pain the soldiers dropped their torches.
One fell to the ground, the other clapped his hands to his face and
ran down the street in an agony as if half-mad. Half a dozen
muskets were discharged, but Terence had stepped back the
moment he had fired, and handed the gun to the count, who was
standing behind him, to recharge. Two other soldiers picked up the
torches, but dropped them as Terence again fired. Another man
snatched up one of them, and flung it across the street. It fell upon
some straw that had been thoroughly soaked by the water, and
burned out there harmlessly. It was not long before the servants
began to arrive with the full buckets, and when these also had been
emptied, Terence, glancing over, had little fear that the pile could
now be lighted. The pails were sent down again, and he waited for
the next move. The fighting had ceased at the other door, the
soldiers having drawn back from the barricade to see the effect of
the fire. Ryan ran across the plank and rejoined Terence.
The text on this page is estimated to be only 28.47%
accurate

THE SACK OF A CITY. 319 "Things are quiet there for the
present," he said. "There has not been much harm done. When they
had partly broken down the door, they began firing through it. Bull
and Macwitty kept the others back from the line of fire, and not a
pistol has been discharged yet. Bull cut down one fellow who tried to
climb over the barricade, but otherwise no blood has been shed on
either side." Help was coming now. One of the Portuguese officers
was admitted with twenty-four men that he had picked up. The
others came in rapidly, and within a quarter of an hour three
hundred men were assembled. All were sober, and looked
thoroughly ashamed of themselves as they were formed up in the
court-yard. Terence went down to them. He said no word of blame. "
Now, men," he said, "you have to retrieve your characters. Half of
you will post yourselves at the windows, from the ground-floor to
the top of the house. You are not to show yourselves till you receive
orders to do so. You are not to load your guns, but as you appear at
the windows, point them down into the street. The officers will post
you five at each window. The rest of you are at once to clear away
the furniture in the hall; and, when you receive the order, throw
open the door and pour out, forming across the street as you do so.
Captain Ryan will be in command of you. You are not to load, but to
clear the street with your bayonets. If any of the soldiers are too
drunk to get out of your way, knock them down with the butt-end of
your muskets; but if they rush at you, use your bayonets." He went
round the house and saw that five men were in readiness at each
window looking into the street. He ordered them to leave the doors
open. "A pistol will be fired from the first landing," he said; " that will
be the signal, then show yourselves at once." He waited until Ryan's
party had cleared away the furniture. He then went out on to the
balcony and addressed the crowd
The text on this page is estimated to be only 28.87%
accurate

320 UNDER WELLINGTON'S COMMAND. of soldiers who


were standing uncertain what step to take next, many of them
having already gone off in search of plunder elsewhere. " Listen to
me, men," he shouted. " Hitherto I have refrained from employing
force against men who, after behaving as heroes, are now acting like
madmen; but I shall do so no longer. I will give you two minutes to
clear off, and anyone who remains at the end of that time will have
to take his chance." Derisive shouts and threats arose in reply. He
turned round and nodded to the count, who was standing at the
door of the room with a pistol in his hand. He raised it and fired, and
in a moment soldiers appeared at every window menacing tho crowd
below with their rifles. At the same moment the door opened, and
the Portuguese poured out, with Ryan at their head, trampling over
the pile raised in front of it. There was a moment of stupefied
dismay amongst the soldiers. Hitherto none had believed that there
were any in the houses, with the exception of a few officers, and the
sudden appearance of a hundred men at the windows and a number
pouring out through the door took them so completely by surprise
that there was not even a thought of resistance. Men who had faced
the terrors of the deadly breaches turned and fled, and, save a few
leaning stupidly against the opposite wall, none remained by the
time Ryan had formed up the two lines across the street. Each of
these advanced a short distance, and were at once joined by the
defenders of the other house, and by those at the windows. "Do you
take command of one line, Bull, and you of the other, Macwitty. I
don't think that we shall be meddled with, but should any of them
return and attack you you will first try and persuade them to go
away quietly. If they still attack, you will at once fire upon them.
Herrara, will you send out all your officers and bring the men in at
the backdoors, as before. We shall soon have the greater part of the
The text on this page is estimated to be only 29.43%
accurate

THE MAN FELL, WITH A SHARP CRY.


The text on this page is estimated to be only 28.25%
accurate

THE SACK OF A CITY. 321 regiment here, and with them


we can hold the street, if necessary, against any force that is likely
to attack it." In half an hour, indeed, more than fifteen hundred men
had been rallied, and while two lines, each a hundred strong, were
formed across the street, some eighty yards apart, the rest were
drawn up in a solid body in the centre, Terence's order being that, if
attacked in force, half of them were to at once enter the houses on
both sides of the street and to man the windows. He felt sure,
however, that the sight of so strong a force would be sufficient to
prevent the rioters interfering with them, the soldiers being, for the
most part, too drunk to act together or with a common object. This,
indeed, proved to be the case. Parties at times came down the
street, but on seeing the dark lines of troops drawn up they retired
immediately on being hailed by the English officers, and slunk off
under the belief that a large body of fresh troops had entered the
town. An hour later a mounted officer, followed by some five or six
others and some orderlies, rode up. "What troops are these1?" the
officer asked. "The Minho Portuguese Regiment, general," Bull
answered, " commanded by Colonel O'Connor." The general rode on,
the line opened, and he and his staff passed through. 'Terence, who
had posted himself in tiie balcony so as to have a view of the whole
street, at once ran down. Two of the men with torches followed him.
On approaching he at once recognized the officer as General
Barnard, who commanded one of the brigades of the light division.
"So your regiment has remained firm, Colonel O'Connor?" the
general said. " I am sorry to say, sir, that it did not at first, but
scattered like the rest of the troops. My officers and myself for some
time defended these two large houses from the attack of the
soldiery. Matters became very serious, and I then sent out some of
my officers, who soon collected three hundred men, (M434) *
The text on this page is estimated to be only 28.60%
accurate

322 UNDER WELLINGTON'S COMMAND. which sufficed to


disperse the rioters without our being obliged to fire a shot. The
officers then again went out, and now between fifteen and sixteen
hundred men are here. I am glad that you have come, sir, for I felt
in a great difficulty. It was hard to stay here inactive when I was
aware that the town was being sacked and atrocities of every kind
perpetrated; but, upon the other hand, I dared not undertake the
responsibility of attempting to clear the streets. Such an attempt
would probably end in desperate fighting. It might, have resulted in
heavy loss on both sides, and have caused such ill-feeling between
the British and Portuguese troops as to seriously interfere with the
general dispositions for the campaign." " No doubt you have taken
the best course that could be pursued, Colonel O'Connor; but I must
take on myself the responsibility of doing something. My appearance
at the head of your regiment will have some effect upon the men of
the light division, and those who are sober will, no doubt, rally round
me, though hitherto my efforts have been altogether powerless. All
the officers will, of course, join us at once. I fear that many have
been killed in trying to protect the inhabitants; but now that we have
at least got a nucleus of good troops, I have no doubt that we shall
be successful. Have you any torches?" "There is a supply of them in
the house, sir." " Get them all lighted, and divide them among the
men. As soon as you have done this form the regiment into column."
"Are they to load, sir?" "Yes," the general said shortly; "but instruct
your officers that no one is to fire without orders, and that the sound
of firing at the head of the column is not to be considered as a
signal for the rest to open fire, though it may be necessary to shoot
some of these insubordinate scoundrels. By the way, I think it will be
best that only the leading company should load. The rest have their
bayonets, and can use them if attacked."
The text on this page is estimated to be only 28.58%
accurate

THE SACK OF A CITY. 323 Some forty torches were handed


over by the count. These were lighted and distributed along the line,
ten being carried by the leading company. "You have bugles,
colonel?" " Yes, sir. There is one to each company." " Let them all
come to the front and play the Assembly as they march on. Now will
you ride at their head by my side, sir1? Dismount one of my
orderlies and take his horse." By the time all the preparations were
completed they had been joined by nearly two hundred more men.
Just before they started, Terence said: " Would it not be well,
general, if I were to tell off a dozen parties of twenty men, each
under the command of a steady non-commissioned officer, to enter
the houses on each side of the road as we go along, and to clear out
any soldiers they may find there?" " Certainly. But I think that when
they see the regiment marching along, and hear the bugles, they will
clear out fast enough of their own accord." With bugles blowing, the
regiment started. Twenty men with an officer had been left behind
at each of the houses they had defended, in case parties of
marauders should arrive and endeavour to obtain an entrance. As
they marched by men appeared at the windows. Most of these were
soldiers, who, with an exclamation of alarm when they saw the
general, followed by two battalions in perfect order, hastily ran down
and made their escape by the backs of the houses, or came quietly
out, and forming in some sort of order, accompanied the regiment.
Several shots were heard behind as the search parties cleared out
those who had remained in the houses, and presently the force
entered the main square of the town and halted in its centre, the
bugles still blowing the Assembly. Numbers of officers at once ran
up, and many of the more sober soldiers. "Form them up as they
arrive," the general said to the officers. In a few minutes some five
hundred men had gathered.
The text on this page is estimated to be only 28.94%
accurate

324 UNDER WELLINGTON'S COMMAND. " Do you break


your regiment up into four columns, Colonel O'Connor. A fourth of
these men shall go with each, with a strong party of officers. The
soldiers will be the less inclined to resist if they see their own
comrades and officers with your troops, than if the latter were alone.
I will take the command of one column myself, do you take that of
another. Colonel Strong, will you join one of the majors of Colonel
O'Connor's regiment, and will you, Major Hughes, join the other. All
soldiers who do not at once obey your summons to fall in will be
taken prisoners, and those who use violence you will shoot without
hesitation. All drunken men are to be picked up and sent back here.
Place a strong guard over them, and see that they do not make off
again." Five minutes kter the four columns started in different
directions. A few soldiers who, inflamed by drink, fired at those who
summoned them to surrender, were instantly shot, and in half an
hour the terrible din that had filled the air had quietened down.
Morning was breaking now. In the great square, officers were busy
drawing up the men who had been brought in, in order of their
regiments. The inhabitants issued from their houses, collected the
bodies of those who had been killed in the streets, and carried them
into their homes, and sounds of wailing and lamentation rose from
every house. Lord Wellington now rode in with his staff. The
regiments that had disgraced themselves were at once marched out
of the town, and their places taken by those of other divisions. But
nothing could repair the damage that had been done, and the
doings of that night excited throughout Spain a feeling of hostility to
the British that has scarcely subsided to this day, and was
heightened by the equally bad conduct of the troops at the storming
of Badajoz. Long before the arrival of Lord Wellington the whole of
the Minho regiment had rejoined. Terence ordered that the late
comers should not be permitted to fall in with their companies,
The text on this page is estimated to be only 28.61%
accurate

THE SACK OF A CITY. 325 but should remain as a separate


body. He marched the regiment to a quiet spot in the suburbs, and
ordered them to form in a hollow square, with the men who had last
joined in the centre. These he addressed sternly. "For the first time",
he said, "since this regiment was formed, I am ashamed of my men.
I had thought that I could rely upon you under all circumstances. I
find that this is not so, and that the greed for plunder has at once
broken down the bonds of discipline. Those who, the moment they
were called upon, returned to their colours, I can forgive, seeing
that the British regiments set them so bad an example, but you
men, who to the last remained insubordinate, I cannot forgive. You
have disgraced not only yourselves, but your regiment, and I shall
request Lord Wellington to attach you to some other force. I only
want to command men I can rely upon." A loud chorus of lament
and entreaty rose from the men. "It is as painful to me as it is to
you," Terence went on, raising his hands for silence. " How proud I
should have been if this morning I could have met the general and
said that the regiment he had been good enough to praise so highly
several times, had proved trustworthy, instead of having to report
that every man deserted his officers, and that many continued the
evil work of pillage, and worse, to the end." Many of the men wept
loudly, others dropped upon their knees and implored Terence to
forgive them. He had already instructed his two majors what was to
be done, and they and the twelve captains now stepped forward. "
Colonel," Bull said, in a loud voice that could be heard all over the
square, "we, the officers of the Minho regiment, thoroughly agree
with you in all that you have said, and feel deeply the disgrace the
conduct of these men has brought upon it, but we trust that you will
have mercy on them ; and we are ready to promise in their name
that never again will
The text on this page is estimated to be only 28.62%
accurate

326 UNDER WELLINGTON'S COMMAND. they so offend,


and that their future conduct will show how deeply they repent of
their error." There was a general cry from the men of, " Indeed we
do. Punish us as you like, colonel, but don't send us away from the
regiment !" Terence stood as if hesitating for some time; then he
said: "I cannot resist the prayer of your officers, men, and I am
willing to believe that you deeply regret the disgrace you have
brought upon us all. Of one thing I am determined upon; not one
man in the regiment shall be any the better for his share in this
night's work, and that this accursed plunder shall not be retained. A
blanket will be spread out here in front of me, and the regiment will
pass along before me by twos. Each man as he files by will empty
out the contents of his pockets and swear solemnly that he has
retained no object of spoil whatever. After that is over I shall have
an inspection of kits, and if any article of value is found concealed I
will hand over its owner to the provost-marshal to be shot
forthwith." The operation took upwards of two hours. At Herrara's
suggestion a table was brought out, a crucifix placed upon it, and
each man as he came up, after emptying out his pockets, swore
solemnly, laying his hand upon the table, that he had given up all
the spoil he had collected. Terence could not help smiling at the
scene the regiment presented before the men began to file past. No
small proportion of the men stripped off their coats and unwound
from their bodies rolls of silk, costly veils, and other stuffs of which
they had taken possession. All these were laid down by the side of
the blanket, on which a pile of gold and silver coins, a great number
of rings, brooches, and bracelets, had accumulated by the time the
whole had passed by. " The money cannot be restored," Terence
said to Herrara, " therefore set four non-commissioned officers to
count it out. Have the jewels all placed in a bag; let all the stuffs and
gar 
The text on this page is estimated to be only 28.55%
accurate

THE SACK OF A CITY. 327 ments be made into bundles. I


shall be obliged if you will take a sufficient number of men to carry
them, and go down yourself with a guard of twenty men to the
syndic, or whatever they call their head man, and hand them over to
him. Say that the Minho regiment returns the spoil it had captured,
and deeply regrets its conduct. Will you say that I beg him to divide
the money among the sufferers most in need of it, and to dispose
the jewels and other things where they can be seen, and to issue a
notice to the inhabitants that all can come and inspect them, and
those who can bring proof that any of the articles belong to them
can take them away." The regiment was by this time formed up
again, and Terence, addressing them, told them of the orders that
he had given, saying that as the regiment had made all the
compensation in their power, and had rid itself of the spoils of a
people whom they had professedly come to aid, it could now look
the Spaniards in the face again. Just as he had concluded a staff-
officer rode up. " Lord Wellington wishes to speak to you, colonel,"
he said. " We have been looking about for you everywhere, but your
regiment seemed to have vanished." " Then I must leave the work of
inspecting the kits to you, Herrara. You will see that every article is
unfolded and closely examined, and place every man in whose kit
anything is discovered under arrest at once. I trust that you will not
find anything, but if you do, place a strong guard over the prisoners,
with loaded muskets, and orders to shoot any one of them who tries
to escape." Walking by the side of the staff-officer — for he had
returned the horse lent him by General Barnard — he accompanied
him to a house in the great square, where Lord Wellington had taken
up his quarters.
The text on this page is estimated to be only 28.81%
accurate

328 UNDER WELLINGTON'S COMMAND. CHAPTER XIX.


GRATITUDE. YOUR regiment has been distinguishing itself again,
Colonel O'Connor, I have heard from three sources. First, General
Barnard reported to me that he and the other officers were wholly
unable to restrain the troops from their villainous work last night
until he found you and your regiment drawn up in perfect order, and
was able with it to put an end to the disorder everywhere reigning.
In the second place, the Count de Montego and the Marquis de
Valoroso, two of the wealthiest nobles in the province, have called
upon me to return thanks for the inestimable service, as they
expressed it, rendered by Colonel O'Connor and his officers in
defending their houses and protecting the lives and honour of their
families from the assaults of the soldiers. They said that the
defenders consisted entirely of officers. How was that?" " I am sorry
to say that my men were at first infected by the general spirit of
disorder. Left alone by ourselves, I thought that we could not do
anything better than save from spoliation two fine mansions that
happened to be at the spot where we had been left. We had to
stand a sharp siege for two or three hours, but we abstained as far
as possible from using our arms, and I think that only two or three
of the soldiers were wounded. However, we should have had to use
our pistols in earnest in a short time had I not sent out several of my
officers by the back entrance of the house, and these were not long
in finding, and persuading to return to their duties, a couple of
hundred men. As soon as we sallied out the affair was at an end,
and the soldiers fled. The officers were sent out again, and when an
hour later General Barnard came up we had some seventeen
hundred in readiness for action, and his arrival relieved me of the
heavy responsibility of deciding what course had better be adopted."
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like