UNIX Shell programming 3rd Edition Stephen Kochan pdf download
UNIX Shell programming 3rd Edition Stephen Kochan pdf download
Kochan download
https://ebookultra.com/download/unix-shell-programming-3rd-
edition-stephen-kochan/
https://ebookultra.com/download/learning-the-bash-shell-unix-shell-
programming-3rd-edition-cameron-newham/
https://ebookultra.com/download/programming-in-objective-c-3rd-
edition-edition-stephen-g-kochan/
https://ebookultra.com/download/korn-shell-programming-by-example-1st-
edition-dennis-obrien/
https://ebookultra.com/download/the-linux-programming-interface-a-
linux-and-unix-system-programming-handbook-1st-edition-michael-
kerrisk/
UNIX Power Tools 3rd Edition Jerry Peek
https://ebookultra.com/download/unix-power-tools-3rd-edition-jerry-
peek/
https://ebookultra.com/download/unix-visual-quickstart-guide-3rd-ed-
edition-ray/
https://ebookultra.com/download/a-practical-guide-to-linux-commands-
editors-and-shell-programming-2nd-edition-mark-g-sobell/
https://ebookultra.com/download/linux-command-line-and-shell-
scripting-bible-3rd-edition-richard-blum/
https://ebookultra.com/download/nonlinear-programming-3rd-edition-
dimitri-bertsekas/
UNIX Shell programming 3rd Edition Stephen Kochan
Digital Instant Download
Author(s): Stephen Kochan, Patrick Wood
ISBN(s): 9780768663273, 076866327X
Edition: 3
File Details: PDF, 2.87 MB
Year: 2003
Language: english
Stephen G. Kochan
Patrick Wood
Unix Shell
Programming
Third Edition
All rights reserved. No part of this book shall be reproduced, stored in a Development Editor
retrieval system, or transmitted by any means, electronic, mechanical, Scott Meyers
photocopying, recording, or otherwise, without written permission
from the publisher. No patent liability is assumed with respect to the Managing Editor
use of the information contained herein. Although every precaution Charlotte Clapp
has been taken in the preparation of this book, the publisher and
author assume no responsibility for errors or omissions. Nor is any Copy Editor
liability assumed for damages resulting from the use of the information Geneil Breeze
contained herein.
Indexer
International Standard Book Number: 0-672-32490-3 Erika Millen
Library of Congress Catalog Card Number: 2002115932
Proofreader
Printed in the United States of America Jessica McCarty
Interior Designer
Trademarks Gary Adair
All terms mentioned in this book that are known to be trademarks or
service marks have been appropriately capitalized. Sams Publishing Cover Designer
cannot attest to the accuracy of this information. Use of a term in this Gary Adair
book should not be regarded as affecting the validity of any trademark
or service mark. Page Layout
Susan Geiselman
Bulk Sales
Sams Publishing offers excellent discounts on this book when ordered
in quantity for bulk purchases or special sales. For more information,
please contact
International Sales
international@pearsoned.com
Contents at a Glance
1 Introduction .................................................................................................1
2 A Quick Review of the Basics .......................................................................5
3 What Is the Shell?.......................................................................................41
4 Tools of the Trade .......................................................................................53
5 And Away We Go........................................................................................99
6 Can I Quote You on That? .......................................................................115
7 Passing Arguments....................................................................................133
8 Decisions, Decisions .................................................................................145
9 ‘Round and ‘Round She Goes...................................................................183
10 Reading and Printing Data .......................................................................209
11 Your Environment ....................................................................................235
12 More on Parameters..................................................................................267
13 Loose Ends ................................................................................................287
14 Rolo Revisited ...........................................................................................307
15 Interactive and Nonstandard Shell Features ............................................325
A Shell Summary..........................................................................................363
B For More Information...............................................................................403
Index .........................................................................................................407
Table of Contents
1 Introduction 1
tr .................................................................................................................78
The -s Option ...................................................................................81
The –d Option ..................................................................................82
grep ............................................................................................................83
Regular Expressions and grep ..........................................................86
The -v Option ...................................................................................87
The -l Option ....................................................................................88
The -n Option ..................................................................................89
sort .............................................................................................................89
The -u Option ...................................................................................90
The -r Option ...................................................................................90
The -o Option ...................................................................................90
The -n Option ..................................................................................91
Skipping Fields .................................................................................92
The -t Option ...................................................................................92
Other Options ..................................................................................93
uniq ............................................................................................................94
The -d Option ...................................................................................95
Other Options ..................................................................................96
Exercises .....................................................................................................97
5 And Away We Go 99
Command Files ..........................................................................................99
Comments ......................................................................................102
Variables ...................................................................................................103
Displaying the Values of Variables .................................................104
The Null Value ................................................................................107
Filename Substitution and Variables .............................................108
The ${variable} Construct ..............................................................110
Built-in Integer Arithmetic ......................................................................110
Exercises ...................................................................................................112
Patrick Wood is the CTO of the New Jersey location of Electronics for Imaging. He
was a member of the technical staff at Bell Laboratories when he met Mr. Kochan in
1985. Together they founded Pipeline Associates, Inc., a Unix consulting firm, where
he was the Vice President. They coauthored Exploring the Unix System, Unix System
Security, Topics in C Programming, and Unix Shell Programming.
Random documents with unrelated
content Scribd suggests to you:
The Ancestral Old Homestead, Built 1676.
AN IOWA WINTER.
My first introduction to an Iowa winter was in a surveyor's camp
on the western borders of the state, a little north of Kanesville (now
Council Bluffs), as cook of the party, which position was speedily
changed and that of flagman assigned to me.
If there are any settlers now left of the Iowa of that day (sixty-
four years ago) they will remember the winter was bitter cold—the
"coldest within the memory of the oldest inhabitant." On my trip
back from the surveying party above mentioned to Eddyville, just
before Christmas, I encountered one of those cold days long to be
remembered. A companion named Vance rested with me over night
in a cabin, with scant food for ourselves or the mare we led. It was
thirty-five miles to the next cabin; we must reach that place or lay
out on the snow. So a very early start was made—before daybreak,
while the wind lay. The good lady of the cabin baked some biscuit
for a noon lunch, but they were frozen solid in our pockets before
we had been out two hours. The wind rose with the sun, and with
the sun two bright sundogs, one on each side, and alongside of
each, but slightly less bright, another—a beautiful sight to behold,
but arising from conditions intolerable to bear. Vance came near
freezing to death, and would had I not succeeded in arousing him to
anger and gotten him off the mare.
I vowed then and there that I did not like the Iowa climate, and
the Oregon fever was visibly quickened. Besides, if I went to Oregon
the government would give us 320 acres of land, while in Iowa we
should have to purchase it,—at a low price to be sure, but it must be
bought and paid for on the spot. There were no pre-emption or
beneficial homestead laws in force then, and not until many years
later. The country was a wide, open, rolling prairie—a beautiful
country indeed—but what about a market? No railroads, no wagon
roads, no cities, no meeting-houses, no schools—the prospect
looked drear. How easy it is for one when his mind is once bent
against a country to conjure up all sorts of reasons to bolster his,
perhaps hasty, conclusions; and so Iowa was condemned as
unsuited to our life abiding place.
But what about going to Oregon when springtime came? An
interesting event was pending that rendered a positive decision
impossible for the moment, and not until the first week of April,
1852, when our first-born baby boy was a month old, could we say
that we were going to Oregon in 1852.
CHAPTER IV.
OFF FOR OREGON.
I have been asked hundreds of times how many wagons were in
the train I traveled with, and what train it was, and who was the
captain?—assuming that, of course, we must have been with some
train.
I have invariably answered, one train, one wagon, and that we
had no captain. What I meant by one train is, that I looked upon the
whole emigration, strung out on the plains five hundred miles, as
one train. For long distances the throng was so great that the road
was literally filled with wagons as far as the eye could reach. At
Kanesville where the last purchases were made, or the last letter
sent to anxious friends, the congestion became so great that the
teams were literally blocked, and stood in line for hours before they
could get out of the jam. Then, as to a captain, we didn't think we
needed one, and so when we drove out of Eddyville, there was but
one wagon in our train, two yoke of four-year-old steers, one yoke of
cows, and one extra cow. This cow was the only animal we lost on
the whole trip—strayed in the Missouri River bottom before crossing.
And now as to the personnel of our little party. William Buck, who
became my partner for the trip, was a man six years my senior, had
had some experience on the Plains, and knew about the outfit
needed, but had no knowledge in regard to a team of cattle. He was
an impulsive man, and to some extent excitable; yet withal a man of
excellent judgment and as honest as God Almighty makes men. No
lazy bones occupied a place in Buck's body. He was so scrupulously
neat and cleanly that some might say he was fastidious, but such
was not the case. His aptitude for the camp work, and unfitness for
handling the team, at once, as we might say by natural selection,
divided the cares of the household, sending the married men to the
range with the team and the bachelor to the camp. The little wife
was in ideal health, and almost as particular as Buck (not quite
though) while the young husband would be a little more on the
slouchy order, if the reader will pardon the use of that word, more
expressive than elegant.
Buck selected the outfit to go into the wagon, while I fitted up the
wagon and bought the team.
We had butter, packed in the center of the flour in double sacks;
eggs packed in corn meal or flour, to last us nearly five hundred
miles; fruit in abundance, and dried pumpkins; a little jerked beef,
not too salt, and last, though not least, a demijohn of brandy for
"medicinal purposes only," as Buck said, with a merry twinkle of the
eye that exposed the subterfuge which he knew I understood
without any sign. The little wife had prepared the home-made yeast
cake which she knew so well how to make and dry, and we had light
bread all the way, baked in a tin reflector instead of the heavy Dutch
ovens so much in use on the Plains.
Albeit the butter to considerable extent melted and mingled with
the flour, yet we were not much disconcerted, as the "short-cake"
that followed made us almost glad the mishap had occurred.
Besides, did we not have plenty of fresh butter, from the milk of our
own cows, churned every day in the can, by the jostle of the wagon?
Then the buttermilk! What a luxury! Yes, that's the word—a real
luxury. I will never, so long as I live, forget that short-cake and corn-
bread, the puddings and pumpkin pies, and above all the buttermilk.
The reader who smiles at this may recall that it is the small things
that make up the happiness of life.
But it was more than that. As we gradually crept out on the Plains
and saw the sickness and suffering caused by improper food and in
some cases from improper preparation, it gradually dawned on me
how blessed I was, with such a partner as Buck and such a life
partner as the little wife. Some trains, it soon transpired, were
without fruit, and most of them depended upon saleratus for raising
their bread. Many had only fat bacon for meat until the buffalo
supplied a change; and no doubt much of the sickness attributed to
the cholera was caused by an ill-suited diet.
I am willing to claim credit for the team, every hoof of which
reached the Coast in safety. Four (four-year-old) steers and two
cows were sufficient for our light wagon and light outfit, not a pound
of which but was useful (except the brandy) and necessary for our
comfort. Not one of these steers had ever been under the yoke,
though plenty of "broke" oxen could be had, but generally of that
class that had been broken in spirit as well as in training, so when
we got across the Des Moines River with the cattle strung out to the
wagon and Buck on the off side to watch, while I, figuratively
speaking, took the reins in hand, we may have presented a ludicrous
sight, but did not have time to think whether we did or not, and
cared but little so the team would go.
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.
ebookultra.com