Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
12Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Linux, Shell Programing and Perl

Linux, Shell Programing and Perl

Ratings: (0)|Views: 77 |Likes:
Published by Miab Cph

More info:

Published by: Miab Cph on Sep 04, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/14/2013

pdf

text

original

 
Linux, Shell Programing and Perl
byWilli-Hans Steeb, Gert Cronje and Yorick HardyInternational School for Scientific Computing
 
Contents
1 Linux Basics 1
1.1 Some Basic Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Working with Files and Directories . . . . . . . . . . . . . . . . . . . 91.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2.2 The Home Directory and Path Names . . . . . . . . . . . . . 101.2.3 Important Directories in the Linux File System . . . . . . . . 121.2.4 Basic Files and Directories Commands . . . . . . . . . . . . . 131.2.5 File Name Substitution . . . . . . . . . . . . . . . . . . . . . . 301.3 Standard Input/Output, and I/O Redirection . . . . . . . . . . . . . 341.4 Additional Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2 Advanced Linux 63
2.1 The Unix File System . . . . . . . . . . . . . . . . . . . . . . . . . . 632.2 Mounting and Unmounting . . . . . . . . . . . . . . . . . . . . . . . . 662.3 MTools Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712.4 Swap Space and the Loopback Device . . . . . . . . . . . . . . . . . . 722.5 Network File-System . . . . . . . . . . . . . . . . . . . . . . . . . . . 732.6 Linuxconf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742.7 Compressed Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752.8 The vi and emacs Editors . . . . . . . . . . . . . . . . . . . . . . . . 782.8.1 vi Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782.8.2 emacs Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 862.9 Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . 892.9.1 C and C++ Compiler . . . . . . . . . . . . . . . . . . . . . . 892.9.2 Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912.9.3 Lisp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922.9.4 Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
3 Linux and Networking 95
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953.2 Basic Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963.3 email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063.4 ftp Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1123.5 Telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1153.6 Remote Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117i
 
3.7 Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1183.8 INETD and Socket Programming . . . . . . . . . . . . . . . . . . . . 119
4 Shell Programming 123
4.1 What is a shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1234.2 The Shell as a Programming Language . . . . . . . . . . . . . . . . . 1274.2.1 Creating a Script . . . . . . . . . . . . . . . . . . . . . . . . . 1284.2.2 Making a Script executable . . . . . . . . . . . . . . . . . . . 1294.3 Shell Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1304.3.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1304.3.2 Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1344.3.3 Control Structures . . . . . . . . . . . . . . . . . . . . . . . . 1374.3.4 Logical AND and Logical OR . . . . . . . . . . . . . . . . . . 1454.3.5 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1494.4 Shell Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1544.4.1 Builtin Commands . . . . . . . . . . . . . . . . . . . . . . . . 1544.4.2 Command Execution . . . . . . . . . . . . . . . . . . . . . . . 1634.5 Advanced examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
5 Perl 173
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1735.2 My First Perl Program . . . . . . . . . . . . . . . . . . . . . . . . . . 1745.3 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1755.4 Arithmetic Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 1775.5 Standard Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1785.6 Basic String Operations . . . . . . . . . . . . . . . . . . . . . . . . . 1795.7 Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1805.8 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1825.9 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1835.10 goto Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1875.11 Mathematical Functions . . . . . . . . . . . . . . . . . . . . . . . . . 1885.12 Bitwise Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1895.13 List Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1905.14 Associative Arrays Operations . . . . . . . . . . . . . . . . . . . . . . 1945.15 Pattern Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1955.16 Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 1965.17 Map Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1995.18 Two-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . 2005.19 Subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2015.20 Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2085.21 File Manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2135.22 Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Bibliography 223
ii

Activity (12)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Sook Sabuy liked this
Satya Nanda liked this
drober liked this
satellitedish liked this
dustinfranklin liked this
levieuxdjo liked this
levieuxdjo liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->