Читаем 100 Shell Programs in Unix полностью

100 SHELL PROGRAMS

IN UNIX

By

Sarika Jain

Head, MCA Department

ABSS, Meerut (U.P.)

Shivani Jain

Senior Lecturer, Department of Computer Science

VCE, Meerut (U.P.)

FIREWAL MEDIA

(An Imprint of Laxmi Publications Pvt. Ltd.)

BANGALORE CHENNAI COCHIN GUWAHATI HYDERABAD

JALANDHAR KOLKATA LUCKNOW MUMBAI RANCHI

NEW DELHI

Published by :

FIREWAL MEDIA

(An Imprint of Laxmi Publications Pvt. Ltd.)

113, Golden House, Daryaganj,

New Delhi-110002

Phone : 011-43 53 25 00

Fax : 011-43 53 25 28

www.laxmipublications.com

[email protected]

Copyright © 2009 by Laxmi Publications Pvt. Ltd. All rights reserved with the Publishers. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without the prior written permission of the publisher.

First Edition

 : 2009

OFFICES

 Bangalore

080-26 61 15 61

 Chennai

044-24 34 47 26

 Cochin

0484-239 70 04

 Guwahati

0361-254 36 69, 251 38 81

 Hyderabad

040-24 65 23 33

 Jalandhar

0181-222 12 72

 Kolkata

033-22 27 43 84

 Lucknow

0522-220 95 78

 Mumbai

022-24 91 54 15, 24 92 78 69

 Ranchi

0651-221 47 64

FSH-3030-100-100 SHELL PROG IN UNIX

C—17102/09/02

Typeset at

: Kalyani Computer Services, New Delhi.

Printed at

: Mehra Offset Press, Delhi.

CONTENTS

Preface

1.    Introduction

I. An Overview

II. Salient Features of Unix

III. Hardware Requirements for Unix

IV. Getting Started

V. Unix Architecture

VI. Unix Basic Commands

VII. Portability with C

2.    Programs

PREFACE

The UNIX system is so successful. Why? First, because UNIX is portable, i.e., runs on a range of computers and adapts to particular requirements. Second, the UNIX programming environment is unusually rich and productive. The UNIX system has become very popular, and there are number of versions in wide use. Regardless of the version you run on your system, the difference in coding you find will be minor.

The book’s small size is meant to keep your investment in time down to a minimum but with the greatest possible amount of knowledge. This book is organized as follows: Part I is an introduction to the most basic use of the system. It covers logging in, the file system, commonly used commands, and logging out. Part II contains 100 programs (including shell script and programs in C).

The best way to learn something is by doing it. Kindly practice the programs and verify or contradict what we say. All the examples in this text are actual, runnable code tested on UNIX system.

As a reader of this book, you are the most important critic and commentator. You can email or write to us directly to let us know what you did or didn’t like about this book – as well as what we can do to make our book stronger.

—AUTHORS

ACKNOWLEDGEMENT

We are grateful to many people for constructive comments and criticisms, and for their help in improving our code. The work of an author is only as good as the support from their family members and friends. Sarika Jain would like to specially thank her husband, Anuj Jain for letting her off all her household chores while working in the tree house on this project. Likewise, Shivani Jain wants to thank her all family members for their understanding and encouragement throughout this project. We cound not have done this without all of you.

—AUTHORS

PART I

INTRODUCTION

I. AN OVERVIEW

Перейти на страницу:

Похожие книги