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
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
UNXprogramShell

UNXprogramShell

Ratings: (0)|Views: 100 |Likes:
Published by strideworld

More info:

Published by: strideworld on Oct 12, 2009
Copyright:Attribution Non-commercial

Availability:

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

05/18/2011

pdf

text

original

 
 Systèmes Répartis
La programmation "Shell"
UNIX Station
UNIX Station
Edition October OO
ESAT
1/41
 
 Systèmes Répartis
La programmation "Shell"
UNIX Station
SOMMAIRE
I) INTRODUCTION______________________________________________________________________________4
1) P
RÉSENTATION
 _________________________________________________________________________________42) R 
EMARQUES
 __________________________________________________________________________________73) C
ONVENTIONS
 
DU
 
SUPPORT
 
DE
 
COURS
 _________________________________________________________________7
II) ELÉMENTS DE BASE DU LANGAGE___________________________________________________________8
4) L
ES
 
COMMENTAIRES
 _____________________________________________________________________________85) Q
UI
 
ANALYSE
?________________________________________________________________________________86) L
E
 
DÉBOGUEUR 
 ________________________________________________________________________________8
III) LES VARIABLES____________________________________________________________________________9
1) L'
AFFECTATION
– L'
ACCÈS
 ________________________________________________________________________92) L
A
 
SUBSTITUTION
 ______________________________________________________________________________103) L
A
 
SAISIE
 
EN
 
INTERACTIF
 _________________________________________________________________________114) L
A
 
PROTECTION
 _______________________________________________________________________________115) L
A
 
SUPPRESSION
 ______________________________________________________________________________116) L
A
 
VISIBILITÉ
 ________________________________________________________________________________127) L
ES
 
VARIABLES
 
PRÉDÉFINIES
 ______________________________________________________________________13
IV) LA "SOUS-EXÉCUTION"____________________________________________________________________14V) LES PARAMÈTRES__________________________________________________________________________15
1) R 
ÉCUPÉRATION
 
DES
 
PARAMÈTRES
 ___________________________________________________________________152) D
ÉCALAGE
 
DES
 
PARAMÈTRES
 ______________________________________________________________________163) R 
É
 
AFFECTATION
 
VOLONTAIRE
 
DES
 
PARAMÈTRES
 _________________________________________________________174) L
E
 
SÉPARATEUR 
 
DE
 
CHAMPS
 
INTERNES
 ________________________________________________________________18
VI) NEUTRALISATION DES MÉTACARACTÈRES________________________________________________19
1) R 
APPEL
 
SUR 
 
LES
 
MÉTA
 
CARACTÈRES
 _________________________________________________________________192) L
E
"
BACKSLASH
"______________________________________________________________________________203) L'
APOSTROPHE
 
OU
"
QUOTTE
 
SIMPLE
"_________________________________________________________________204) L
E
 
DOUBLE
 
GUILLEMET
 __________________________________________________________________________20
VII) LES CONTRÔLES BOOLÉENS______________________________________________________________21
1) I
 NTRODUCTION
 ________________________________________________________________________________212) L
A
 
COMMANDE
"
TEST
"__________________________________________________________________________22
a) Test simple sur les fichiers...................................................................................................................................22b) Test complexe sur les fichiers (uniquement en "Korn Shell" et en "Bourne again Shell")..................................22c) Test sur les longueurs de chaînes de caractères..................................................................................................23d) Test sur les chaînes de caractères........................................................................................................................23e) Test sur les numériques........................................................................................................................................23 f) Connecteurs d'expression......................................................................................................................................23
VIII) LES STRUCTURES DE CONTRÔLES________________________________________________________24
1) I
 NTRODUCTION
 ________________________________________________________________________________242) L'
ALTERNATIVE
 
SIMPLE
 __________________________________________________________________________243) L'
ALTERNATIVE
 
COMPLEXE
 _______________________________________________________________________254) L
E
 
BRANCHEMENT
 
À
 
CHOIX
 
MULTIPLE
 ________________________________________________________________265) L
A
 
BOUCLE
 
SUR 
 
CONDITION
 _______________________________________________________________________276) L
ES
 
COMMANDES
"
TRUE
"
ET
"
FALSE
"________________________________________________________________277) L
A
 
BOUCLE
 
SUR 
 
LISTE
 
DE
 
VALEURS
 __________________________________________________________________288) I
 NTERRUPTION
 
D
'
UNE
 
OU
 
PLUSIEURS
 
BOUCLES
 __________________________________________________________299) I
 NTERRUPTION
 
D
'
UN
 
PROGRAMME
 ___________________________________________________________________3010) L
E
 
GÉNÉRATEUR 
 
DE
 
MENUS
 
EN
 
BOUCLE
("K 
ORN
S
HELL
"
ET
"B
OURNE
 
AGAIN
S
HELL
")_____________________________30
IX) LES FONCTIONS___________________________________________________________________________31
1) I
 NTRODUCTION
 ________________________________________________________________________________312) P
ASSAGE
 
DE
 
VALEURS
 ___________________________________________________________________________32
Edition October OO
ESAT
2/41
 
 Systèmes Répartis
La programmation "Shell"
UNIX Station
3) R 
ETOUR 
 
DE
 
FONCTION
 ___________________________________________________________________________32
X) LES COMPLÉMENTS________________________________________________________________________33
1) L
A
 
COMMANDE
"
EXPR 
"__________________________________________________________________________33
a) Arithmétique.........................................................................................................................................................33b) Comparaison........................................................................................................................................................34c) Travail sur chaînes de caractères........................................................................................................................34
2) L
A
 
COMMANDE
"
GREP
"__________________________________________________________________________353) L
A
 
COMMANDE
"
CUT
"__________________________________________________________________________364) L
A
 
COMMANDE
"
SORT
"__________________________________________________________________________365) L
A
 
COMMANDE
"
SED
"___________________________________________________________________________376) L
A
 
COMMANDE
"
TR 
"___________________________________________________________________________377) L
A
 
COMMANDE
"
WC
"___________________________________________________________________________388) L
A
 
COMMANDE
"
EVAL
"__________________________________________________________________________389) L
A
 
GESTION
 
DE
 
L
'
ÉCRAN
(
CODES
"E
SCAPE
")___________________________________________________________39
Edition October OO
ESAT
3/41

You're Reading a Free Preview

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