ogrammierung - wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des befehls...

266
Batch-Programmierung Wikibooks.org

Upload: others

Post on 30-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bat

ch-P

rogr

amm

ieru

ng

Wik

iboo

ks.o

rg

Page 2: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

27.J

uni2

012

On

the

28th

ofA

pril

2012

the

cont

ents

ofth

eE

nglis

has

wel

las

Ger

man

Wik

iboo

ksan

dW

ikip

edia

proj

ects

wer

elic

ense

dun

derC

reat

ive

Com

mon

sA

ttrib

utio

n-Sh

areA

like

3.0

Unp

or-

ted

licen

se.A

nU

RIt

oth

islic

ense

isgi

ven

inth

elis

toffi

gure

son

page

235.

Ifth

isdo

cum

enti

sa

deriv

edw

ork

from

the

con-

tent

sof

one

ofth

ese

proj

ects

and

the

cont

entw

asst

illlic

ense

dby

the

proj

ectu

nder

this

licen

seat

the

time

ofde

rivat

ion

this

docu

men

thas

tobe

licen

sed

unde

rth

esa

me,

asi

mila

ror

aco

mpa

tible

licen

se,a

sst

ated

inse

ctio

n4b

ofth

elic

ense

.The

listo

fcon

tribu

tors

isin

clud

edin

chap

terC

ontri

buto

rson

page

223.

The

licen

ses

GPL

,LG

PLan

dG

FDL

are

incl

uded

inch

ap-

terL

icen

seso

npa

ge24

1,si

nce

this

book

and/

orpa

rtsof

itm

ayor

may

notb

elic

ense

dun

der

one

orm

ore

ofth

ese

licen

ses,

and

thus

requ

ire

incl

usio

nof

thes

elic

ense

s.T

helic

ense

sof

the

figur

esar

egi

ven

inth

elis

toffi

gure

son

page

235.

Page 3: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Inha

ltsve

rzei

chni

s1

Allg

emei

neIn

form

atio

n.

..

..

..

..

..

..

..

..

..

..

..

..

..

31.

1B

atch

-Pro

gram

mie

rung

..

..

..

..

..

..

..

..

..

..

..

..

31.

2W

ieer

stel

leic

hei

neB

atch

date

i?.

..

..

..

..

..

..

..

..

..

61.

3A

llgem

eine

Info

rmat

ione

n.

..

..

..

..

..

..

..

..

..

..

.7

2W

icht

ige

DO

S-K

omm

ando

s.

..

..

..

..

..

..

..

..

..

..

..

.9

2.1

asso

c.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.10

2.2

attr

ib.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.10

2.3

cacl

s.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

112.

4cd

/chd

ir.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.11

2.5

chcp

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

162.

6cl

s.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

172.

7co

mp

oder

fc.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

17

III

Page 4: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.8

(x)c

opy/

robo

copy

..

..

..

..

..

..

..

..

..

..

..

..

..

.17

2.9

date

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

182.

10de

l/er

ase

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.20

2.11

deltr

ee.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.21

2.12

dir

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

212.

13ed

it.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.24

2.14

exit

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.24

2.15

find

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

242.

16fo

rmat

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.25

2.17

help

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

252.

18ip

confi

g.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.26

2.19

keyb

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

262.

20lo

adhi

gh.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.27

2.21

md

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.27

2.22

mor

e.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.27

2.23

mov

e.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.28

2.24

nets

h.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.29

2.25

path

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

302.

26pr

ompt

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.30

2.27

rd/r

mdi

r.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.31

Page 5: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.28

ren

oder

rena

me

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.31

2.29

set

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.32

2.30

setlo

cal

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

322.

31st

art

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

322.

32ta

skki

ll.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

332.

33ta

sklis

t.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

332.

34tim

e.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.34

2.35

title

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

352.

36ty

pe.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.36

2.37

Col

or.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

363

Bat

chB

efeh

le.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.39

3.1

Vors

icht

Lee

rzei

chen

!.

..

..

..

..

..

..

..

..

..

..

..

..

393.

2@

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.40

3.3

:(D

oppe

lpun

kt)

..

..

..

..

..

..

..

..

..

..

..

..

..

..

423.

4C

AL

L.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

443.

5C

LS

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

483.

6C

MD

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.49

3.7

CO

LO

R.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.52

3.8

CO

MM

AN

D.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

543.

9E

CH

O.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

55

Page 6: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.10

FOR

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

603.

11G

OTO

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.70

3.12

IF.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.71

3.13

PAU

SE.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.79

3.14

PUSH

D/P

OPD

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.81

3.15

RE

M.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.82

3.16

STA

RT

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

833.

17V

aria

blen

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.87

4B

atch

Ope

rato

ren

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

934.

1&

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.93

4.2

|.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.94

4.3

&&

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

964.

4||

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

974.

5<

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

984.

6>

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

994.

7>>

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.10

25

Erw

eite

rung

enun

terW

indo

ws

NT

..

..

..

..

..

..

..

..

..

..

.10

55.

1B

atch

para

met

er.

..

..

..

..

..

..

..

..

..

..

..

..

..

.10

55.

2St

ring

man

ipul

atio

n.

..

..

..

..

..

..

..

..

..

..

..

..

.10

65.

3U

mge

bung

svar

iabl

en.

..

..

..

..

..

..

..

..

..

..

..

..

110

Page 7: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

5.4

Die

Kom

man

doze

ilele

rntR

echn

en.

..

..

..

..

..

..

..

..

.11

35.

5B

enut

zere

inga

ben

..

..

..

..

..

..

..

..

..

..

..

..

..

.11

45.

6A

usga

ben

inei

neV

aria

ble

umle

iten

..

..

..

..

..

..

..

..

.11

66

Prog

ram

mie

rung

shilf

en.

..

..

..

..

..

..

..

..

..

..

..

..

..

119

7N

etzw

erku

mge

bung

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.14

77.

1pi

ng.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.14

77.

2ip

confi

g.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.14

97.

3tr

acer

t.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

155

7.4

nets

tat

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.15

67.

5N

ET

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

157

8B

eisp

iele

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..1

719

Zus

atz-

Tool

s.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

205

10R

efer

enz

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.20

910

.1L

iste

alle

rint

erne

nun

dex

tern

enB

efeh

le(e

ntsp

rich

tder

Aus

gabe

des

Bef

ehlshelp

unte

rWin

dow

sX

P).

..

..

..

..

..

..

..

..

.20

911

Web

Lin

ks.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.21

711

.1W

eblin

ks.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

217

12A

utor

en.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

223

Abb

ildun

gsve

rzei

chni

s.

..

..

..

..

..

..

..

..

..

..

..

..

..

..

235

Page 8: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

13L

icen

ses

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..2

4113

.1G

NU

GE

NE

RA

LPU

BL

ICL

ICE

NSE

..

..

..

..

..

..

..

..

.241

13.2

GN

UFr

eeD

ocum

enta

tion

Lic

ense

..

..

..

..

..

..

..

..

..

250

13.3

GN

UL

esse

rGen

eral

Publ

icL

icen

se.

..

..

..

..

..

..

..

..

257

Kat

egor

ie:B

uch

mit

Dru

ckve

rsio

n1

1http://de.wikibooks.org/wiki/Kategorie%3ABuch%20mit%

20Druckversion

Page 9: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 10: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1A

llgem

eine

Info

rmat

ion

1.1

Bat

ch-P

rogr

amm

ieru

ng

Bat

chpr

ogra

mm

e(h

äufig

mit

Stap

elve

rarb

eitu

ngsp

rogr

amm

eod

erku

rzSt

a-pe

lpro

gram

müb

erse

tzt)

sind

mei

stku

rze

Dat

eien

,die

Bef

ehle

derK

omm

an-

doze

ilede

rRei

hena

chab

arbe

iten.

Bat

chpr

ogra

mm

ieru

nger

füllt

edi

egr

und-

lege

nden

Anf

orde

rung

enan

eine

Prog

ram

mie

rspr

ache

wie

z.B

.if

,ifnot

undwhile

.Da

Bat

chsi

chin

den

Ber

eich

Shel

lscr

iptin

gei

nord

nen

läss

t,ka

nnm

anvo

nei

neri

nter

pret

erba

sier

ten

Skri

ptsp

rach

ere

den.

Das

heiß

t,da

ssdi

e

3

Page 11: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

imE

dito

rer

stel

lteTe

xtda

tei

nich

tm

itei

nem

Com

pile

r1ei

nmal

inM

asch

i-ne

nspr

ache

über

setz

tund

inei

nera

usfü

hrba

ren

Bin

ärda

teii

m*.exe

Form

atge

spei

cher

t,so

nder

nbe

ijed

emA

ufru

fdur

chei

nen

Inte

rpre

terz

urL

aufz

eiti

nei

nfü

rden

Com

pute

rver

stän

dlic

hes

Form

atüb

erse

tztw

ird.E

inTe

xted

itorw

ieM

SN

otep

ad,d

enW

indo

ws

von

Hau

sau

sm

itbri

ngt,

reic

htvo

llkom

men

aus

umB

atch

prog

ram

me

zusc

hrei

ben.

Bat

chpr

ogra

mm

ieru

ngis

tspe

ziel

lfür

die

Steu

erun

gde

sB

etri

ebss

yste

ms

geda

cht,

fürd

ieE

ntw

ickl

ung

von

Anw

endu

n-ge

nis

tsie

nich

tgee

igne

t.H

ierz

uve

rwen

detm

anSp

rach

enw

ieC

/C++

und

Java

(nic

htzu

verw

echs

eln

mit

Java

Scri

pt!!

).

Vie

lew

iede

rkeh

rend

eIn

stal

latio

ns-u

ndV

erw

altu

ngsa

ufga

ben,

die

man

trad

i-tio

nell

mit

Tast

atur

und

Mau

sau

sfüh

rt,la

ssen

sich

mit

Stap

elda

teie

nau

sfüh

ren.

Hat

man

genü

gend

Kom

men

tarz

eile

nin

die

Bat

chda

teie

inge

fügt

,gen

ügtd

erA

usdr

uck

derS

tape

ldat

eim

eist

als

Dok

umen

tatio

n.

Kom

man

doze

ilenb

efeh

leun

dB

atch

date

ien

sind

kein

eve

ralte

teTe

chno

logi

e.A

ufW

unsc

hvi

eler

Syst

emad

min

istr

ator

enha

tMic

roso

ftda

fürg

esor

gt,d

ass

1http://de.wikibooks.org/wiki/Compiler

Page 12: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Win

dow

sSe

rver

2003

volls

tänd

igvo

nde

rK

omm

ando

zeile

inst

allie

rtun

dad

min

istr

iert

wer

den

kann

,ohn

edi

eM

aus

zube

nutz

en.

Indi

esem

Buc

hge

htes

auss

chlie

ßlic

hum

die

Ers

tellu

ngvo

nB

atch

-Dat

eien

unte

rWin

dow

sun

dD

OS.

And

ere

Bet

rieb

ssys

tem

ebi

eten

verg

leic

hbar

eun

dw

esen

tlich

mäc

htig

ere

Funk

tione

n(w

iez.

B.d

iein

derL

inux

-Wel

twei

tver

-br

eite

teB

ash

oder

App

leSc

ript

fürd

enM

ac).

Die

Beg

riff

e"S

tape

lpro

gram

m"

und

"Sta

pelv

erar

beitu

ng"

rühr

enau

sde

rZei

the

r,al

sPe

rman

ents

peic

hera

ufM

agne

tpla

tten

sehr

teue

rwar

.Zu

dies

erZ

eit

bega

bm

ansi

chm

itei

nem

Stap

elL

ochk

arte

nau

sPa

ppe,

aufd

enen

sich

das

Prog

ram

mun

ddi

eD

aten

inge

stan

zter

Form

befa

nden

,zum

Rec

henz

entr

umun

düb

erga

bde

mO

pera

tor

sein

enSt

apel

.Die

Stap

elal

ler

Ben

utze

rw

urde

nge

sam

mel

tund

dann

sequ

entie

llan

den

Rec

hner

über

gebe

n.N

ach

eini

gerZ

eit

konn

tem

ansi

chda

nndi

e(m

eist

ausg

edru

ckte

n)E

rgeb

niss

eab

hole

n.

Page 13: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1.2

Wie

erst

elle

ich

eine

Bat

chda

tei?

Wie

bere

itsge

sagt

,rei

chte

inei

nfac

herE

dito

raus

.Em

pfeh

len

kann

man

gute

nG

ewis

sens

den

quel

loff

enen

und

kost

enlo

sen

Not

epad

++2 -E

dito

r,al

sbe

sser

eA

ltern

ativ

ezu

MS

Not

epad

.Spe

iche

rnSi

eda

nndi

eD

atei

mit

der

End

ung

*.bat

ab.A

nsch

ließe

ndm

üsse

nSi

enu

rdie

Dat

eist

arte

n:D

ies

könn

enSi

een

twed

erdi

rekt

inW

indo

ws

oder

inde

mSi

ein

derD

OS-

Eing

abea

uffo

rder

ung

inda

sen

tspr

eche

nde

Ver

zeic

hnis

wec

hsel

nun

dde

nD

atei

nam

enei

ngeb

en.

Unt

erW

indo

ws

NT-

kom

patib

len

Bet

riebs

syst

emen

gibt

esse

itW

indo

ws

2000

auch

Bat

chda

teie

nm

itde

rEnd

ung*.cmd

.Die

sew

erde

nge

nau

wie

Bat

chda

-te

ien

mit

derE

ndun

g*.bat

vera

rbei

tetb

zw.a

usge

führ

t.D

ieEn

dung

*.cmd

wur

deur

sprü

nglic

hau

sK

ompa

tibili

täts

grün

den

zuO

S/2,

eine

mB

etri

ebss

ys-

tem

das

MS

ursp

rüng

lich

inK

oope

ratio

nm

itIB

Men

twic

kelte

,mit

Win

dow

sN

T3.

xei

ngef

ührt

.

2http://notepad-plus.sourceforge.net/de/site.htm

Page 14: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1.3

Allg

emei

neIn

form

atio

nen

•A

llgem

eine

Info

rmat

ione

n:W

ikip

edia

:bat

ch3

•In

fos

zurc

md.

exe:

Wik

iped

ia:c

md.

exe4

•D

iefü

rWin

dow

sXP

verf

ügba

ren

Kom

man

dosk

önne

nau

chim

Hilf

esys

tem

von

Win

dow

sdi

rekt

eing

eseh

enw

erde

n:•

STA

RT

-Hilf

eun

dSu

ppor

t•

"Bef

ehls

zeile

nref

eren

zA

-Z"

inda

sSu

chfe

ldei

ntra

gen.

(Für

engl

isch

esW

indo

ws

"Com

man

d-lin

ere

fere

nce

A-Z

")

3http://de.wikipedia.org/wiki/Stapelverarbeitung

4http://de.wikipedia.org/wiki/cmd.exe

Page 15: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 16: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2W

icht

ige

DO

S-K

omm

ando

s

Man

unte

rsch

eide

tbei

DO

S-B

efeh

len

grun

dsät

zlic

hzw

isch

enin

tern

enun

dex

tern

enB

efeh

len.

Inte

rne

Bef

ehle

sind

Bes

tand

teil

derS

hell

selb

st,w

ähre

ndex

tern

eB

efeh

leal

sei

gene

Prog

ram

me

vorl

iege

n.D

ieD

OS-

Bef

ehle

,die

in-

tere

ssan

tfür

die

Bat

ch-P

rogr

amm

ieru

ngse

inkö

nnte

n,si

ndim

Folg

ende

nau

fgel

iste

t:

9

Page 17: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.1

asso

c

Mit

Hilf

edi

eses

Bef

ehls

kann

man

die

Dat

eier

wei

teru

ngen

bear

beite

nbz

w.

anze

igen

lass

en.

assoc

[.dateiendung[=Dateibeschreibung]]

2.2

attr

ib

Änd

ertd

asD

atei

attr

ibut

.Mög

lich

sind

"sch

reib

gesc

hütz

t"(+

r/-r

),"v

erst

eckt

"(+

h/-h

)und

"arc

hiv"

(+a/

-a)

Page 18: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.3

cacl

s

Änd

ert

die

Rec

hte

(Acc

ess

Con

trol

lL

ist)

auf

NT

FSPa

rtiti

onen

oder

zeig

tdi

ese

an.

cacls

*.*/E

/T

/G

Bob:C

Fügt

beis

piel

swei

sede

mU

serB

obda

sR

echt

"Änd

ern"

füra

lleD

atei

enun

dO

rdne

rim

aktu

elle

nun

dal

len

Unt

eror

dner

nhi

nzu.

Ach

tung

!Sta

ndar

dmäß

igw

erde

nR

echt

eer

setz

t!

2.4

cd/c

hdir

Übe

rde

ncd

-od

erchdir

-Bef

ehl

(cha

nge

dire

ctor

y)ka

nnda

sak

tuel

leVe

rzei

chni

sgew

echs

eltw

erde

n.B

each

te:N

ach

dem

"cd"

folg

tein

Leer

zeic

hen,

Page 19: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

das

bein

achf

olge

ndem

..od

er\j

ena

chB

etri

ebss

yste

mve

rsio

nw

egge

lass

enw

erde

nda

rf.W

irdde

rBef

ehlo

hne

Para

met

erau

sgef

ührt,

sow

irdde

rPfa

dde

sak

tuel

len

Ver

zeic

hnis

ses

ausg

egeb

en.

rela

tive

Ang

aben

:

Die

Ein

gabe

von

"cd

.."w

echs

elti

nda

snä

chst

höhe

reV

erze

ichn

is("

cd..\

.."zw

eiE

bene

nhö

heru

sw.).

Die

Ein

gabe

von

"cd

OR

DN

ER

NA

ME

"w

echs

elt

inde

nU

nter

ordn

erO

RD

NE

RN

AM

E.

abso

lute

Ang

aben

:

Page 20: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Die

Ein

gabe

von

"cd

\"w

echs

elti

nda

sH

aupt

verz

eich

nis

auf

dem

derz

eitig

befin

dlic

hen

Lau

fwer

k.

Die

Ein

gabe

von

"cd

\OR

DN

ER

NA

ME

"w

echs

elt

abso

lut

inde

nO

rdne

rO

RD

NE

RN

AM

Eau

fdem

derz

eitig

befin

dlic

hen

Lau

fwer

k.

Die

Ein

gabe

von

"LA

UFW

ER

KSB

UC

HST

AB

E:"

(ohn

evo

rang

este

lltes

"cd"

)w

echs

elt

inda

sak

tuel

leV

erze

ichn

isde

sge

wäh

lten

Lau

fwer

ksL

AU

FWE

RK

SBU

CH

STA

BE

.

Die

Ein

gabe

von

"cd

LA

UFW

ER

KSB

UC

HST

AB

E:\O

RD

NE

RN

AM

E"

wec

hsel

tabs

olut

inde

nO

rdne

rOR

DN

ERN

AM

Eau

fdem

gew

ählte

nLa

ufw

erk

von

LA

UFW

ER

KSB

UC

HST

AB

Eje

doch

nich

tvon

eine

mL

aufw

erk

aufe

inan

dere

s.

Page 21: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Pfad

anga

ben

mit

Lee

rsch

läge

n(B

sp"C

:\pro

gram

files

\")

müs

sen

inA

nfüh

rung

s-/S

chlu

ssze

iche

nei

nges

chlo

ssen

sein

.

Der

Bef

ehl"

cd/D

%˜d

p0"

wec

hsel

tin

den

Ord

nerd

esB

atch

-Skr

ipts

.(si

nnvo

llbe

iWin

dow

s-D

oppe

lklic

ks)

Wild

card

s:

Ist

die

Pfad

anga

beei

ndeu

tigka

nnde

rO

rdne

rnam

edu

rch

Nut

zen

von

Wild

card

s(z

.b.\

win

*fü

r\w

indo

ws

oder

\win

nt)a

bgek

ürzt

wer

den.

Die

sis

tje

doch

imB

atch

betr

ieb

nich

trat

sam

.

Rem

otes

yste

me:

Page 22: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Pfad

evo

nni

cht

als

Lau

fwer

ken

verb

unde

nen

Rem

otes

yste

men

könn

en(B

erec

htig

ung

vora

usge

setz

t)en

twed

erüb

erdi

eA

dmin

istr

ativ

eFr

eiga

beod

erdu

rch

das

Ver

bind

enei

nes

Net

zlau

fwer

ksan

gesp

roch

enw

erde

n.B

eisp

ielf

ürad

min

istr

ativ

eFr

eiga

be:\

\[co

mpu

tern

ame]

\[la

ufw

erk]

$\[W

eite

rerP

fad]

Pfad

inV

aria

ble:

Der

Bef

ehl"

setP

FAD

=%cd

%"

schr

eibt

das

aktu

elle

Ver

zeic

hnis

indi

eV

a-ri

able

%PF

AD

%.(

als

letz

tes

imB

atch

-Scr

iptm

it"c

d%

PFA

D%

"w

iede

rins

Star

tver

zeic

hnis

wec

hsel

n!)

Page 23: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.5

chcp

Anz

eige

dera

ktue

llen

Cod

ePag

eod

erSe

tzen

eine

rneu

enC

odeP

age

(cha

nge

code

page

)

chcp

[nnn]

Bei

spie

lefü

rnnn

:

•43

7–

Die

ursp

rüng

liche

Zei

chen

satz

tabe

llede

sIB

M-P

C•

720

–A

rabi

sche

sA

lpha

bet

•73

7–

Gri

echi

sche

sA

lpha

bet

•85

0–

wes

teur

opäi

sche

Spra

chen

(DO

S-L

atin

-1)

•85

7–

Tür

kisc

hes

Alp

habe

t•

866

–K

yrill

isch

esA

lpha

bet

Page 24: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.6

cls

Lös

chtd

enB

ildsc

hirm

inha

lt(c

lear

scre

en)

2.7

com

pod

erfc

Verg

leic

htde

nIn

halt

zwei

erD

atei

enun

dst

ellt

die

Unt

ersc

hied

eda

r(co

mpa

re/f

ileco

mpa

re).

2.8

(x)c

opy/

robo

copy

Mit

dem

Bef

ehlcopy

könn

enei

neD

atei

oder

meh

rere

Dat

eien

kopi

ertw

erde

n.

xcopy

istd

ieer

wei

tert

eV

ersi

onvo

ncopy

,die

meh

rOpt

ione

nbi

etet

.Die

seis

tnic

htin

alle

nW

indo

ws-

Ver

sion

enve

rfüg

bar.

Page 25: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Das

wei

taus

mäc

htig

ererobocopy

ista

bV

ista

stan

dard

mäß

igw

iede

rve

r-fü

gbar

,bei

Win

dow

sX

Pun

d20

00fe

hltd

iese

sPr

ogra

mm

zunä

chst

.Mic

roso

ftst

ellt

robo

copy

aber

imW

indo

ws

Serv

er20

03R

esou

rce

Kit

Tool

s20

03au

chfü

rdie

seB

etri

ebss

yste

mve

rsio

nen

bere

it.

Mit

dem

Bef

ehl

copy

/b"D

AT

EI"

+"D

AT

EI"

"NE

UE

DA

TE

I"ka

nnm

anD

atei

enzu

sam

men

füge

n.

2.9

date

Gib

tdas

aktu

elle

Dat

umau

sun

der

mög

licht

dem

Ben

utze

rdie

Änd

erun

gde

sD

atum

s.W

ird

der

Bef

ehlm

itde

mPa

ram

eter

/tau

fger

ufen

,so

wir

dnu

rda

sak

tuel

leD

atum

ausg

egeb

en.U

mda

sD

atum

zute

ilen,

also

z.B

.nur

das

Jahr

zuve

rwen

den,

gibt

esfo

lgen

deSy

ntax

:

Page 26: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

date:˜6,4

Bei

spie

l:

z:\>echo

%date:˜6,4%

2010

Hie

rw

erde

nvo

mD

atum

die

erst

en6

Zei

chen

weg

gela

ssen

und

dann

vier

Stel

len

ange

zeig

t.B

eitim

e1fu

nktio

nier

tdas

anal

og.

Bei

eini

gen

Bet

rieb

ssys

tem

vers

ione

ner

ford

ertd

asÄ

nder

nde

sSy

stem

datu

ms

adm

inis

trat

ive

Rec

hte.

XP:

Die

Aus

gabe

des

Dat

umsf

orm

ates

ista

bhän

gig

von

den

Ein

stel

lung

enin

den

Reg

ions

-und

Spra

chop

tione

n(S

yste

mst

euer

ung)

1K

apite

l2.3

4au

fSei

te34

Page 27: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.10

del/

eras

e

Lös

chte

ine

Dat

ei,d

iesi

chim

aktu

elle

nV

erze

ichn

isbe

finde

t.A

lsPa

ram

eter

mus

sm

inde

sten

sde

rDat

eina

me

ange

gebe

nw

erde

n.W

eite

rePa

ram

eter

sind

optio

nal:

•/p

-sol

len

meh

rere

Dat

eien

gelö

scht

wer

den,

mus

sje

deei

nzel

neL

ösch

ung

best

ätig

twer

den.

•/f

-auc

hsc

hrei

bges

chüt

zte

Dat

eien

wer

den

gelö

scht

.•

/s-l

ösch

tauc

hD

atei

en,d

iesi

chin

den

Unt

erve

rzei

chni

ssen

befin

den.

•/q

-Unt

erbi

ndet

Bes

tätig

ung.

Bei

spie

l:

eras

eH

:\zul

ösch

ende

date

i.bat

Page 28: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.11

deltr

ee

Lös

chtV

erze

ichn

is(s

e)in

kl.u

nter

geor

dnet

eD

atei

en.

Unt

erW

indo

ws

XP

laut

etde

rBef

ehlr

mdi

r.D

eltr

eeke

nnte

sni

chtm

ehr.

An-

mer

kung

:rm

dir/r

dve

rste

htke

ine

Wild

card

s('*

'ode

r'?'

)im

Verz

eich

nisn

amen

.

2.12

dir

Der

Bef

ehldir

(dire

ctor

y)ze

igta

lleVe

rzei

chni

sse

und

Unt

erve

rzei

chni

sse

an.

Ver

zeic

hnis

sew

erde

nse

itW

indo

ws

95al

sO

rdne

rbez

eich

net,

unte

rsch

eide

nsi

chal

lerd

ings

nich

tvon

Ver

zeic

hnis

sen.

Derdir

-Bef

ehlh

atza

hlre

iche

Opt

ione

n:

Page 29: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

•/b

-Nur

derD

atei

nam

ew

ird

ausg

egeb

en.D

ieA

usga

beal

lerw

eite

ren

Info

r-m

atio

nen

wie

beis

piel

swei

seD

atum

,Grö

ßeod

erD

aten

träg

erbe

zeic

hnun

gw

ird

unte

rdrü

ckt.

•/c

-Die

Dat

eigr

öße

wird

mit

eine

mPu

nkta

lsTr

ennz

eich

enzw

isch

enje

wei

lsdr

eiD

ezim

alst

elle

nan

gege

ben,

also

beis

piel

swei

se34

3.23

2(S

tand

arde

in-

stel

lung

).So

lldi

esun

terd

rück

twer

den,

gebe

nSi

eal

sO

ptio

n/-

can

.•

/p-

Bei

jede

mSe

itenu

mbr

uch

wir

ddi

eA

usga

beun

terb

roch

en,

bis

der

Anw

ende

rein

eTa

ste

drüc

kt.

•/o

n-G

ibtd

asV

erze

ichn

isal

phab

etis

chso

rtie

rtau

s.•

/w-M

ehre

reE

intr

äge

inei

nerZ

eile

wer

den

ange

zeig

t.•

/ah

-Ver

stec

kte

Dat

eien

wer

den

ange

zeig

t.•

/a-A

lleve

rste

ckte

n-un

dSy

stem

-Dat

eien

wer

den

ange

zeig

t.•

/s-Z

eigt

auch

den

Inha

ltde

rUnt

erve

rzei

chni

sse

an.

Mit

dem

Bef

ehldir[Dateiname]

ist

esau

chm

öglic

h,D

atei

enim

aktu

elle

nV

erze

ichn

iszu

such

en.

Alte

rnat

ivka

nnau

chde

rPl

atzh

alte

r*

(bsp

w.:dir*.*

)ve

rwen

det

wer

den,

umna

chbe

stim

mte

nD

atei

enzu

Page 30: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

such

en.

Mitdir

*.

wer

den

nur

Obj

ekte

ohne

Dat

eina

men

-Erw

eite

rung

ange

zeig

t.In

derR

egel

habe

nO

rdne

rkei

neE

rwei

teru

ngun

dD

atei

enei

neE

rwei

teru

ng.

Indi

esem

Fall

wer

den

nurO

rdne

rang

ezei

gt.O

rdne

rwer

den

imD

OS

mit

vord

emO

rdne

rnam

enge

kenn

zeic

hnet

.2.1

2.1

Kom

bina

tione

n

dir

/w/o/s/p

durchsucht

den

aktuellen

Pfad

inklusive

Unterordner

nach

einer

Datei

und

stellt

das

Ergebnis

seitenweise

dar.

Page 31: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.13

edit

Mitedit

wir

dei

nE

dito

rgeö

ffne

t,zu

mB

eisp

ielz

umB

earb

eite

nvo

n

Bat

ch2 -o

derT

extd

atei

en.2

.14

exit

Bee

ndet

die

Ein

gabe

auff

orde

rung

/keh

rtzu

Win

dow

szu

rück

.2.1

5fin

d

Mit

dem

Bef

ehlfind

kann

-au

chin

meh

rere

nD

atei

en-

nach

eine

rZe

iche

nfol

gege

such

twer

den.

Auc

hfind

kann

mit

Para

met

ern

gest

euer

tw

erde

n:find/i

igno

rier

tGro

ß-/K

lein

schr

eibu

ngbe

imSu

chbe

griff

find/v

Zei

gtal

leZ

eile

nan

,die

die

Zei

chen

folg

eN

ICH

Ten

thal

ten.

find/c

Zeig

tnur

die

Anz

ahld

erdi

eZe

iche

nfol

geen

thal

tend

enZe

ilen

an.find/n

Zei

gtdi

eZ

eile

nm

itih

ren

Zei

lenn

umm

ern

an.

2http://de.wikibooks.org/wiki/Batch

Page 32: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.16

form

at

Form

atie

rtdi

eFe

stpl

atte

oder

Dis

kette

.Mit

form

atc:

wir

ddi

eFe

stpl

atte

c:fo

rmat

iert

.Mit

form

ata:

wir

ddi

eD

iske

tteim

Lau

fwer

ka:

form

atie

rt.

Mit

form

atc:

-sbz

w.

form

ata:

-ska

nnm

andi

eFe

stpl

atte

/Dis

kette

mit

Syst

emda

teie

nfo

rmat

iere

n,so

dass

sie

nach

herb

ootf

ähig

sind

.

2.17

help

Die

Hilf

e-Fu

nktio

nst

ehti

nal

len

Win

dow

s-Sy

stem

en(a

ußer

Win

9X,d

.h.

95/9

8/M

E)z

urV

erfü

gung

.Der

allg

emei

neB

efeh

lhie

rzu

laut

ethelp

.Als

Aus

gabe

wir

dei

neL

iste

mit

eine

mTe

ilde

rver

fügb

aren

Kom

man

doze

ilen-

Bef

ehle

ausg

egeb

en.D

iese

Lis

ten

umfa

sstd

enB

efeh

lsna

men

(lin

keSp

al-

te)

und

eine

Bes

chre

ibun

g(r

echt

eSp

alte

).So

llei

nB

efeh

lge

naue

rer

-kl

ärt

wer

den,

sola

utet

die

Ein

gabe

helpBEFEHLSNAME

oder

auch

BEFEHLSNAME/?

.Die

seE

inga

bein

die

Kom

man

doze

ilefö

rder

tdet

ail-

Page 33: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

liert

eIn

form

atio

nen

und

z.T.

auch

Bei

spie

lezu

eine

mB

efeh

lzu

Tage

.Es

wer

den

jedo

chni

chta

lleB

efeh

ledi

ees

imD

OS

gibt

ange

zeig

t.

2.18

ipco

nfig

Info

rmat

ione

nüb

erdi

eW

indo

ws-

IP-K

onfig

urat

ion

Deripconfig

-Bef

ehlh

atfo

lgen

deO

ptio

nen:

•••••/a

ll-Z

eigt

zusä

tzlic

heD

etai

ls•

/rel

ease

-Gib

tdie

zuge

teilt

eIP

-Adr

esse

zurü

ck•

/ren

ew-B

ezie

htei

nene

ueIP

-Adr

esse

2.19

keyb

Läd

tTas

tatu

rtre

iber

.key

bgr

„c:\d

os\k

eybo

ard.

sys

lädt

den

deut

sche

nTa

sta-

turt

reib

er(k

eybo

ard.

sys

mus

ssi

chim

Ver

zeic

his

c:\d

os\b

efind

en)

Page 34: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.20

load

high

Läd

tPro

gram

me

infr

eie

UM

BU

pper

-Mem

ory-

Blo

cks

2.21

md

Der

Bef

ehlmd

(mak

edi

rect

ory)

legt

ein

neue

sV

erze

ichn

isan

.

2.22

mor

e

Mit

der

Aus

gabe

umle

itung

|more

(bsp

w.:type[Dateiname]|

more

)wir

dbe

iSei

tenw

echs

elzu

rBes

tätig

ung

aufg

efor

dert

.

Dam

itbe

steh

tdie

Mög

lichk

eitü

ber

meh

rere

Seite

nfü

hren

deD

okum

ente

anzu

zeig

en.

more

istd

erei

nzig

eB

efeh

l,be

ider

auch

inde

rDO

S-W

eltd

ieso

gena

nnte

Pipe

verw

ende

twir

d.B

eide

rPi

peha

ndel

tes

sich

umda

sZ

eich

en|

.Mit

Page 35: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

dies

emZ

eich

enis

tes

mög

lich,

zwei

Bef

ehle

mite

inan

dera

ufei

nesp

ezie

lleW

eise

zuve

rbin

den.

Dab

eiw

irdde

rers

teB

efeh

laus

gefü

hrt,

sein

eA

usga

ben

wer

den

jedo

chni

chta

ufde

nB

ildsc

hirm

gesc

hrie

ben,

sond

ern

inei

nen

Puff

er.

Der

zwei

teB

efeh

lw

ird

auf

eine

Wei

sege

star

tet,

dass

erse

ine

Ein

gabe

nni

chtv

onde

rTas

tatu

r,so

nder

nvo

neb

endi

esem

Puff

erbe

kom

mt.

Mitmore

iste

seb

enfa

llsm

öglic

hde

nIn

halt

eine

rD

atei

anei

nean

dere

Dat

eian

zuhä

ngen

.

Soka

nnm

anzu

mB

eisp

iel

mit:

more"C:\eins.txt">>

"D:\zwei.txt"

den

Inha

ltde

r"e

ins.

txt"

ande

nIn

halt

der

"zw

ei.tx

t"an

häng

en."

eins

.txt"

wir

dda

bein

icht

verä

nder

t.

2.23

mov

e

Ver

schi

eben

von

eine

rode

rmeh

rere

rDat

eien

von

eine

mV

erze

ichn

isin

ein

ande

res.

oder

Page 36: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

ein

Ver

zeic

hnis

umbe

nenn

en

move

test

test_neu

2.24

nets

h

Ohn

ePa

ram

eter

eing

abe

ergi

btsi

chei

nne

uerK

onte

xt.W

eite

reH

ilfe

mit:

?B

eisp

iel:

nets

hin

terf

ace

dum

p>

ipco

nf1.

dat

Die

seZe

ileal

sB

atch

-Dat

eiau

sgef

ührt

legt

die

mom

enta

neIP

-Kon

figur

atio

nin

eine

rDat

eina

men

sip

conf

1.da

tab.

Um

geke

hrtk

ann

aus

eine

rDat

eiz.

B.

nam

ens

ipco

nf2.

date

ine

neue

IP-K

onfig

urat

ion

gela

den

und

über

nom

men

wer

den:

netsh

-f

ipconf2.dat

Page 37: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Solä

ssts

ich

eine

IP-K

onfig

urat

ion

ohne

Um

herk

licke

nin

Syst

emm

enüs

able

gen

und

(mod

ifizi

ert)

wie

derz

urüc

khol

en.

2.25

path

Dur

chdi

eA

ngab

eei

nes

Pfad

esw

irdda

sB

etrie

bssy

stem

aufd

erK

omm

ando

-ze

ileda

zuau

fgef

orde

rt,n

eben

dem

aktu

elle

nV

erze

ichn

isau

chin

wei

tere

nV

erze

ichn

isse

nzu

such

en.W

ird

derB

efeh

lohn

ePa

ram

eter

ausg

efüh

rt,s

ow

erde

nal

leak

tuel

len

Pfad

eau

sgeg

eben

.

2.26

prom

pt

Leg

tdas

Aus

sehe

nde

rEin

gabe

zeile

fest

.

Page 38: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.27

rd/r

mdi

r

Der

Bef

ehlrd

oderrmdir

(rem

ove

dire

ctor

y)lö

scht

ein

Verz

eich

nis,

wen

ndi

eses

leer

ist.

Para

met

er:

•/s

Lös

chte

inen

ganz

enV

erze

ichn

isba

umm

itD

atei

en•

/qL

ösch

toh

neN

achf

rage

ganz

eV

erze

ichn

isbä

ume.

Kan

nin

Bat

ch-

Dat

eien

prak

tisch

sein

.D

erV

erze

ichn

isna

me

darf

kein

eW

ildca

rds

enth

alte

n('*

'ode

r'?'

).

rmdir

/s

/q

C:\temp

2.28

ren

oder

rena

me

Dat

ei(e

n)um

bene

nnen

.

Page 39: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.29

set

set

setz

tein

ete

mpo

räre

Um

gebu

ngsv

aria

ble

oder

gibt

die

Var

iabl

enw

erte

aus.

Tem

porä

rbed

eute

tjew

eils

nurf

ürdi

eak

tuel

lecm

dSe

ssio

n.

2.30

setlo

cal

setlocal

Steu

ertd

ieB

egre

nzun

gde

sG

ültig

keits

bere

iche

svo

nder

un-

gen.

Wir

dm

itendlocal

been

det.

2.31

star

t

Öff

netn

eues

Fens

terf

ürei

gene

sPr

ogra

mm

.B

eisp

iel:

(Win

XP)

zum

öffn

enei

nes

neue

nK

onso

lenf

enst

ers

inde

mei

neD

atei

aufg

eruf

enw

ird.

star

t"N

ame

des

neue

nFe

nste

rs"

/WA

IT/D

C:\t

emp

/NO

RM

AL

call

test

.bat

/WA

IT=

War

tetb

isA

nwen

dung

gesc

hlos

sen

wir

d.

Page 40: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

/NO

RM

AL

=St

arte

tAnw

endu

ngin

derN

OR

MA

L-P

rior

itäts

klas

se.

/D=

Dan

ach

folg

tdas

Star

tver

zeic

hnis

2.32

task

kill

Ab

Win

dow

sX

Pka

nnm

anm

itdi

esem

Bef

ehl

eine

nPr

ozes

sbe

ende

n,be

ispi

elsw

eise

wen

ndi

eser

nich

tm

ehr

reag

iert

.U

nter

Ein

bind

ung

von

/tw

erde

nau

chal

leun

terg

eord

nete

nPr

ozes

sebe

ende

t,un

dw

enn

man

/fhi

nzuf

ügt,

wir

dda

sB

eend

ener

zwun

gen.

taskkill

/f

iexplore.exe

/t

2.33

task

list

Die

serB

efeh

llis

teta

lleak

tiven

Proz

esse

auf,

die

gera

deau

fdie

sem

Com

-pu

terl

aufe

n.D

amit

läss

tsic

hzu

mB

eisp

ield

erN

ame

eine

szu

been

dend

en

Page 41: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Proz

esse

ser

mitt

eln

(sie

heun

ten:

task

kill)

.Mit

eine

mhi

nzug

efüg

ten

/nh

wer

den

die

Spal

tenü

bers

chri

ften

ausg

eble

ndet

.D

erB

efeh

l"ta

sklis

t"is

ters

tab

Win

dow

sX

Pve

rfüg

bar.

2.34

time

Gib

tdie

aktu

elle

Zei

taus

und

erm

öglic

htde

mB

enut

zerd

ieÄ

nder

ung

der

Uhr

zeit.

Wir

dde

rBef

ehlm

itde

mPa

ram

eter

/tau

fger

ufen

,so

wir

dnu

rdie

aktu

elle

Zei

taus

gege

ben.

time3

kann

auch

als

Var

iabl

ebe

nutz

twer

den,

soka

nnm

anzu

mB

eisp

ielm

it%

time:

˜0,5

%di

eer

sten

5Z

eich

enüb

erne

hmen

.B

eisp

iele

:

C:\>time

Aktuelle

Zeit:

10:03:04,63

Geben

Sie

die

neue

Zeit

ein:

c:\>echo

%time%

3K

apite

l2.3

4au

fSei

te34

Page 42: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

10:03:04,63

c:\>echo

%time:˜0,5%

10:03

Bei

eini

gen

Bet

rieb

ssys

tem

vers

ione

ner

ford

ertd

asÄ

nder

nde

rSys

tem

zeit

adm

inis

trat

ive

Rec

hte.

2.35

title

Die

serB

efeh

länd

ertd

ieFe

nste

rübe

rsch

rift

des

Prog

ram

mfe

nste

rs.

title

Beispiel

Page 43: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2.36

type

Gib

tden

(rei

nen

Text

-)In

halt

dera

ngeg

eben

enD

atei

(z.B

.*.b

at,*

.cm

dod

er*.

txt)

aus.

2.37

Col

or

Gib

tdie

Farb

ean

Farb

attr

ibut

ew

erde

ndu

rch

ZW

EI

hexa

dezi

mal

eZ

iffer

nan

gege

ben

-di

eer

ste

bezi

ehts

ich

aufd

enH

inte

rgru

nd,d

iezw

eite

aufd

enVo

rder

grun

d.Je

deZ

iffer

kann

eine

nde

rfol

gend

enW

erte

anne

hmen

:

0=

Schwarz

8=

Dunkelgrau

1=

Dunkelblau

9=

Blau

2=

Dunkelgrün

A=

Grün

3=

Blaugrün

B=

Zyan

4=

Dunkelrot

C=

Rot

5=

Lila

D=

Magenta

Page 44: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6=

Ocker

E=

Gelb

7=

Hellgrau

F=

Weiß

Page 45: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 46: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3B

atch

Bef

ehle

3.1

Vors

icht

Lee

rzei

chen

!

Fehl

plaz

ierte

oder

fehl

ende

Leer

zeic

hen

könn

enbe

idem

Prog

ram

mie

ren

eine

rB

atch

-Dat

eizu

Fehl

ern

führ

en.B

eide

nna

chfo

lgen

den

Bei

spie

len

ist

also

aufd

ieSe

tzun

gvo

nL

eerz

eich

enun

dau

fent

spre

chen

deB

emer

kung

enge

nau

zuac

hten

.Sch

einb

argr

undl

ose

Abb

rüch

ebe

imA

usfü

hren

eine

rBat

ch-D

atei

könn

eneb

enfa

llsfe

hlpl

atzi

erte

nod

erfe

hlen

den

Lee

rzei

chen

gesc

huld

etse

in.

39

Page 47: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.2

@

Scha

ltetd

ieA

usga

bede

rBef

ehls

zeile

aufd

emB

ildsc

hirm

nurf

ürde

nak

tuel

len

Bef

ehla

usun

dis

tsel

bstk

ein

eige

nerB

efeh

l.

Synt

ax

@befehl

Stap

elan

wei

sung

:Ab

MS-

DO

Sbi

sW

indo

ws

7

Bei

spie

l:

Inha

ltecho

Diese

Zeile

wird

mit

Befehlszeile

ausgefuehrt...

@echo

und

diese

ohne!

Aus

gabe

C:\>echo

Diese

Zeile

wird

mit

Befehlszeile

ausgefuehrt...

Diese

Zeile

wird

mit

Befehlszeile

ausgefuehrt...

Page 48: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

und

diese

ohne!

InB

atch

File

sver

hind

ert"

@ec

hoof

f"zu

Beg

inn

desS

krip

tesd

ieA

usga

beal

ler

(!)B

efeh

lsze

ilen

aufd

emB

ildsc

hirm

bis

die

Stap

elve

rarb

eitu

ngbe

ende

twir

d,ab

bric

htod

erm

itten

drin

ein

"@ec

hoon

"B

efeh

lerf

olgt

,um

z.B

.Bef

ehls

zeile

nta

tsäc

hlic

han

zuze

igen

und

dann

ausz

ufüh

ren.

Kom

men

tare

(mit

:1od

erR

EM2 )

wer

den

natü

rlic

hau

chni

chta

ngez

eigt

.Ist

aber

nure

inN

eben

effe

kt.

@echo

off

REM

Verhindert,

dass

dieser

Kommentar

angezeigt

wird.

Ohn

e@

echo

off:

C:\>REM

Dieser

Kommentar

wird

so

angezeigt

1K

apite

l3.3

aufS

eite

422

Kap

itel3

.15

aufS

eite

82

Page 49: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.3

:(D

oppe

lpun

kt)

Spru

ngm

arke

füre

inU

nter

prog

ram

mbz

w.e

ine

Kom

men

tarz

eile

.

Spru

ngm

arke

nw

erde

nbe

nötig

t,w

enn

mitt

els

derB

atch

date

iein

eB

edin

gung

über

prüf

tund

erfü

lltbz

wni

chte

rfül

ltw

ird

und

ents

prec

hend

wei

terv

erfa

hren

wer

den

soll.

Mit

dem

Bat

chbe

fehlgoto

wir

ddi

eSp

rung

mar

kean

gesp

rung

en.

Anm

erku

ng:

Der

Dop

pelp

unkt

hat

auch

die

Funk

tion

der

Man

ipul

atio

nvo

nV

aria

blen

,w

enn

erdi

rekt

hint

erei

nerV

aria

blen

steh

t.Si

ehe

Kap

itel"

Varia

blen

"in

dies

erPu

blik

atio

n.

Synt

ax

Page 50: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

:NAMEDERSPRUNGMARKE

Spru

ngm

arke

nei

nebe

liebi

geL

änge

habe

n,un

ter

MS-

DO

Sun

däl

tere

nW

indo

ws-

Ver

sion

enw

erde

nal

lerd

ings

nurd

ieer

sten

8Z

eich

enbe

acht

et,d

erR

est

wir

dig

nori

ert.

Kom

men

inei

ner

Bat

chal

so:Sprungmarke1

und

:Sprungmarke2

vor,

sow

ird

unte

rUm

stän

den

nurd

ieer

ste

beim

Auf

ruf

eine

rder

Bei

den

gefu

nden

.Als

obe

sser:ziel1

oder:1st

schr

eibe

n.G

roß-

und

Kle

insc

hrei

bung

wir

dni

chtu

nter

schi

eden

.

Bei

spie

l:

Inha

ltif

exist

C:\blabla.txt

goto

EDITBLA

goto

END

::

Kommentarzeile,

sofern

es

erforderlich

ist,

einen

Kommentar

zu

schreiben

::

Zur

Unterscheidung

von

Sprungmarken

verwende

ich

zwei

"::"

:EDITBLA

edit

c:\blabla.txt

Page 51: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

:END

Sofe

rndi

eD

ateiC:\blabla.txt

exis

tiert

,wir

dsi

em

itedit

geöf

fnet

,so

nstw

irdda

sUnt

erpr

ogra

mm

über

spru

ngen

und

die

Bat

chda

teib

eide

rMar

ke:END

fort

gese

tzt,

also

been

det.

Seit

die

Bef

ehls

erw

eite

rung

enak

tivie

rtsi

nd,s

teht

inB

atch

date

ien

die

Spru

ng-

mar

ke:EOF

zurV

erfü

gung

,wel

che

sich

unsi

chtb

aram

End

ede

rBat

ch-D

atei

befin

det.

3.4

CA

LL

Mitcall

kann

man

eine

ande

reB

atch

-Dat

eiau

fruf

en.S

obal

ddi

ese

been

det

wur

de,w

ird

die

ursp

rüng

liche

Bat

chda

teiw

eite

raus

gefü

hrt.

Bei

spie

l:

Page 52: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

REM

Call.cmd

@echo

off

echo

Diese

Batchdatei

ruft

eine

andere

auf.

call

anderedatei.bat

pause

REM

anderedatei.bat

@echo

off

echo

Die

andere

Datei

Die

Aus

gabe

wen

nm

andi

eD

atei

Cal

l.cm

dst

arte

t:Diese

Batchdatei

ruft

eine

andere

auf.

Die

andere

Datei

{Pause}

Wen

ndi

eB

efeh

lser

wei

teru

ngen

aktiv

iert

sind

(Sta

ndar

dab

Win

dow

s20

00)

kann

man

auch

Spru

ngm

arke

nau

fruf

en(u

ndau

chPa

ram

eter

über

gebe

n):

Bei

spie

l:@echo

off

REM

Diese

Batchdatei

ruft

eine

eigene

Sprungmarke

auf

Page 53: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

Vor

dem

Sprung

call

:sprungmarke

echo

Nach

dem

Sprung

pause

goto

end

:sprungmarke

echo

Sprungmarke

aufgerufen!

goto

:eof

::

":EOF"

führt

nicht

zum

unsichtbaren

Ende

der

Batch-Datei,

wie

oben

beschrieben,

::

sondern

führt

die

Batch-Datei

nach

dem

Aufruf

der

Sprungmarke

fort

:end

exit

Die

Aus

gabe

:Vor

dem

Sprung

Sprungmarke

aufgerufen!

Nach

dem

Sprung

Bei

spie

lmit

Para

met

er:

Page 54: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

@echo

off

REM

Diese

Batchdatei

ruft

eine

eigene

Sprungmarke

auf

echo

Vor

dem

Sprung

call

:sprungmarke

meinParameter

echo

Nach

dem

Sprung

pause

goto

end

:sprungmarke

echo

Sprungmarke

aufgerufen

und

Parameter

%1

uebergeben!

goto

:eof

:end

exit

Die

Aus

gabe

:Vor

dem

Sprung

Sprungmarke

aufgerufen

und

Parameter

meinParameter

uebergeben!

Nach

dem

Sprung

goto

:eof

Page 55: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Die

ser

Bef

ehl

spri

ngt

auto

mat

isch

zum

End

ede

rB

atch

date

i(b

eend

etdi

eak

tuel

lePr

ozed

ur)

3.5

CL

S

Mitcls

(cle

arsc

reen

)wir

dde

rBild

schi

rmge

lösc

ht.

Synt

ax

cls

Inte

rner

Bef

ehl:

Ab

MS-

DO

Sbi

sW

indo

ws

7

Bei

spie

l:

Inha

lt@echo

off

echo

Hier

schreibe

ich

jetzt

ganz

viel

Text.

echo

Hier

kann

ich

z.B.

hinschreiben,

dass

ich

jemanden

mag.

Page 56: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo.

echo

Aber

den

Text

sieht

man

gleich

sowieso

nicht

mehr...

Hihi!

cls

echo

War

irgendetwas?

pause>nul

Aus

gabe

War

irgendetwas?

3.6

CM

D

Das

Prog

ram

m,d

ases

mög

lich

mac

ht,D

OS-

Bef

ehle

aufe

inem

NT-

Syst

emzu

benu

tzen

.CM

Dis

tdie

NT-

Ent

spre

chun

gvo

nC

OM

MA

ND

3 .

Synt

ax:

3K

apite

l3.8

aufS

eite

54

Page 57: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

cmd/a|/u|/q|/d|/e(ON|OFF)|/f(ON|OFF)|/v

(ON|OFF)|/cbefehl|/s|/k|/y

Kon

sole

:Ab

Win

dow

sN

T4.

0bi

sW

indo

ws

NT

6.1

(Win

dow

s7)

Bei

spie

l:

Inha

ltcmd

Aus

gabe

(unt

erX

P)C:\>cmd

Microsoft

Windows

XP

[Version

5.1.2600]

(C)

Copyright

1985-2001

Microsoft

Corp.

C:\>

Aus

gabe

(unt

erV

ista

)

C:\>cmd

Microsoft

Windows

[Version

6.0.6001]

Copyright

(c)

2006

Microsoft

Corporation.

Alle

Rechte

vorbehalten.

Page 58: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

C:\>

Aus

gabe

(unt

erW

in7)

C:\>cmd

Microsoft

Windows

[Version

6.1.7600]

Copyright

(c)

2009

Microsoft

Corporation.

Alle

Rechte

vorbehalten.

C:\>

Aus

gabe

(unt

erW

in8

Bet

a)

C:\>cmd

Microsoft

Windows

[Version

6.2.8250]

Copyright

(c)

2012

Microsoft

Corporation.

Alle

Rechte

vorbehalten.

C:\>

Page 59: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.7

CO

LO

R

Mit

dem

Bef

ehlC

OL

OR

kann

man

die

Vord

er-u

ndH

inte

rgru

ndfa

rbe

verä

n-de

rn.D

ieC

OL

OR

Wer

tebe

steh

enau

szw

eiH

EX

-Wer

ten.

0=

Schw

arz

1=

Dun

kelb

lau

2=

Dun

kelg

rün

3=

Bla

ugrü

n

4=

Dun

kelr

ot

5=

Lila

6=

Ock

er

7=

Hel

lgra

u

8=

Dun

kelg

rau

Page 60: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

9=

Bla

u

A=

Grü

n

B=

Zya

n

C=

Rot

D=

Mag

enta

E=

Gel

b

F=

Wei

ß

Der

Bef

ehl

COLOR

2F

ergi

btz.

B.e

inen

grün

enH

inte

rgru

ndm

itw

eiße

rSch

rift

.

Page 61: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.8

CO

MM

AN

D

Star

tete

inen

neue

nK

omm

ando

inte

rpre

ter.

Die

ser

kann

mitexit

wie

der

been

detw

erde

n.

Synt

ax:

command

Laufwerk:PfadGerät/e/l/u/P/MSG/LOW

(/Y(/c|/k)Befehl)

Kon

sole

:Ab

MS-

DO

Sbi

sW

indo

ws

XP

Bei

spie

l:

Inha

ltcommand

Aus

gabe

(unt

erW

indo

ws

95)

C:\WINDOWS>command

Microsoft(R)

Windows

95

Page 62: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

(C)Copyright

Microsoft

Corp

1981-1996.

C:\WINDOWS>

3.9

EC

HO

Gib

tei

nen

Text

aus

oder

scha

ltet

die

Bef

ehls

zeile

nan

/aus

.Wen

nei

nTe

xtau

sgeg

eben

wird

,kön

nen

dort

auch

Varia

blen

4an

geze

igtw

erde

n,w

iez.

B.d

ieV

aria

ble

%ve

r%(i

nW

indo

ws

XP

%os

%).

Synt

ax:

echo

text|ON|OFF

oder

alte

rnat

ivecho.[text]

Inte

rner

Bef

ehl:

Ab

MS-

DO

Sbi

sW

indo

ws

NT

5.1

(XP)

Bei

spie

l:

4K

apite

l3.1

7au

fSei

te87

Page 63: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Inha

lt@echo

off

echo

Die

aktuelle

Datei

heißt

%0.

echo

Die

aktuelle

Version

Ihrer

Befehls-Konsole

oder

-OS

heißt

%ver%

Aus

gabe

Die

aktuelle

Datei

heißt

beispiel.bat.

Die

aktuelle

Version

Ihrer

Befehls-Konsole

oder

-OS

heißt

Windows

NT

Mitecho.

könn

enSi

ezu

dem

leer

eZ

eile

nau

sgeb

en.B

eisp

iel:

Inha

lt@echo

off

echo

Jetzt

gibt

es

3Leere

Zeilen

zu

sehen!

echo.

echo.

echo.

echo

So!

Da

waren

sie.

Aus

gabe

Jetzt

gibt

es

3Leere

Zeilen

zu

sehen!

Page 64: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

So!

Da

waren

sie.

3.9.

1B

enut

zere

inga

ben

mit

EC

HO

Mit

Hilf

ede

secho

-Bef

ehls

könn

enSi

eau

chin

eine

mSk

ript

Ben

utze

rein

ga-

ben

sim

ulie

ren,

inde

mSi

ede

nPi

pe-O

pera

tor|

verw

ende

n.

Bei

spie

l:U

hrze

itan

zeig

enoh

neN

achf

rage

Das

norm

ale

Verh

alte

nde

stime

-Bef

ehls

ist,

die

aktu

elle

Zeit

derv

erw

ende

ten

Syst

emuh

ran

zuze

igen

und

inde

rnä

chst

enZ

eile

die

Ein

gabe

eine

rne

uen

Uhr

zeit

zuer

war

ten.

Drü

cktm

anau

fEnt

er,b

leib

tdie

Syst

emze

itun

verä

nder

t.W

illm

andi

eZ

eitn

uran

zeig

enla

ssen

(z.B

.in

eine

rBat

chda

teiv

orun

dna

chei

ner

Bef

ehls

folg

e,um

zum

esse

n,w

iela

nge

der

PCda

für

brau

cht)

,lä

sst

Page 65: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

sich

die

Bet

ätig

ung

derE

nter

-Tas

tedu

rch

eine

nen

tspr

eche

ndenecho

-Bef

ehl

erse

tzen

.echo.|time

Übe

rden

Pipe

-Mec

hani

smus

läss

tsic

hda

rübe

rhin

aus

die

Zei

le„G

eben

Sie

die

neue

Uhr

zeit

ein:

“un

terd

rück

en:

echo.|time|find

/v

"neue"

Dab

eiis

tdie

Gro

ß-/K

lein

schr

eibu

ngvo

n"n

eue"

zube

acht

enod

erde

rSch

al-

ter/I

zuve

rwen

den,

denn

find

istc

ase-

sens

itiv!

Die

seB

eisp

iele

dien

enal

lerd

ings

nurz

urD

emon

stra

tion,

denn

die

Zei

taus

gabe

wär

eau

choh

nePi

pes

(abe

rers

tab

Win

dow

s20

00)m

öglic

hm

it:time

/t

oder

einf

ach:

echo

%time%

Page 66: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Sehr

nütz

lich

istd

asecho

-Pip

ing

auch

zurÜ

berg

abe

von

Ben

utze

rein

gabe

n,w

elch

evo

nei

nzel

nen

Bef

ehle

nab

gefr

agtw

erde

n.

Bei

spie

l:Ü

berp

rüfu

ngei

ner

Fest

plat

te

chkdsk

c:

/f

/r

kann

(da

essi

chbe

imL

aufw

erk

Cum

das

Syst

emla

ufw

erk

hand

elt)

erst

nach

eine

mSy

stem

star

taus

gefü

hrtw

erde

n.N

orm

aler

wei

sem

üsst

ede

rB

enut

zer

desw

egen

den

Syst

emst

artd

urch

Ein

gabe

von

"Y"

best

ätig

en.D

iese

Akt

ion

kann

man

inei

nem

Bat

chso

abbi

lden

:echo

y|

chkdsk

c:

/f

/r

.

Page 67: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.10

FOR

Erm

öglic

htdi

eSc

hlei

fenb

earb

eitu

ng.

Synt

ax:

for

Variablein

SatzdoBefehl[Parameter]

Inte

rner

Bef

ehl:

Ab

MS-

DO

Sbi

sW

indo

ws

NT

6.1

(Win

dow

s7)

Bei

spie

l:

Zei

gtal

leD

atei

enim

Ver

zeic

hnis

%te

mp%

an.E

sw

erde

nnu

rDat

eien

,kei

neV

erze

ichn

isse

ange

zeig

t.U

mV

erze

ichn

isse

anzu

zeig

ensi

ehe

Lis

tede

rFO

R-

Opt

ione

nun

ten.

Der

Para

met

er/R

bew

irkt

,das

sal

leU

nter

verz

eich

niss

em

itei

nbez

ogen

wer

den

(Rek

ursi

veSc

hlei

fe).

AC

HT

UN

G:

Page 68: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Die

Varia

ble

darf

nura

usei

nem

Buc

hsta

ben

best

ehen

!"%

t"is

terla

ubt,

"%te

st"

nich

t!B

eide

rV

erw

endu

ngm

ehre

rer

Bef

ehle

mus

szw

isch

en"D

O"

und

der

Kla

mm

er"(

"ei

nL

eerz

eich

ense

in.

Fals

ch for

Variablein

Satzdo(

RIC

HT

IG

for

Variablein

Satzdo

(Befehl1

Befehl2

)

Inha

lt@echo

off

for

/R

%temp%

%%f

in

(*.*)

do

(

Page 69: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

%%f

) REM

Den

Befehl

könnte

man

auch

einzeilig

schreiben.

pause

Aus

gabe

(Alle

Temp-Dateien)

Bitte

beliebige

Taste

drücken...

Zähl

schl

eife

n

Mit

solc

hen

Schl

eife

nka

nnm

anA

ktio

nen

eine

best

imm

teA

nzah

loft

ausf

üh-

ren.

Daz

um

uss

man

den

Para

met

er/L

ange

ben.

Synt

ax:for/L{Variable}IN(Startzahl,Schrittweite,

Endzahl)DO(Aktion)

REM

Schreibe

Text

5Mal

for

/L

%%N

IN

(1,

1,

5)

DO

echo

Nummer

%%N

Page 70: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Aus

gabe

:

C:\>for

/L

%%N

IN

(1,

1,

5)

DO

echo

Nummer

%%N

C:\>echo

Nummer

1Nummer

1

C:\>echo

Nummer

2Nummer

2

C:\>echo

Nummer

3Nummer

3

C:\>echo

Nummer

4Nummer

4

C:\>echo

Nummer

5Nummer

5

vers

chac

htel

teZ

ähls

chle

ife:

for

/L

%%N

IN

(1,

1,

5)

DO

Page 71: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

for

/L

%%N

IN

(1,

1,

%N)DO

echo

Nummer

%N

Aus

gabe

:

C:\>for

/L

%%N

IN

(1

15)

DO

(for

/L

%N

IN

(1

1%N)

DO

echo

Nummer

%N

)

C:\>(for

/L

%%N

IN

(1

11)

DO

echo

Nummer

%N

)

C:\>echo

Nummer

1Nummer

1

C:\>(for

/L

%%N

IN

(1

12)

DO

echo

Nummer

%N

)

C:\>echo

Nummer

1Nummer

1

C:\>echo

Nummer

2Nummer

2

C:\>(for

/L

%%N

IN

(1

13)

DO

echo

Nummer

%N

)

C:\>echo

Nummer

1

Page 72: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Nummer

1

C:\>echo

Nummer

2Nummer

2

C:\>echo

Nummer

3Nummer

3

C:\>(for

/L

%%N

IN

(1

14)

DO

echo

Nummer

%N

)

C:\>echo

Nummer

1Nummer

1

C:\>echo

Nummer

2Nummer

2

C:\>echo

Nummer

3Nummer

3

C:\>echo

Nummer

4Nummer

4

C:\>(for

/L

%%N

IN

(1

15)

DO

echo

Nummer

%N

)

C:\>echo

Nummer

1

Page 73: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Nummer

1

C:\>echo

Nummer

2Nummer

2

C:\>echo

Nummer

3Nummer

3

C:\>echo

Nummer

4Nummer

4

C:\>echo

Nummer

5Nummer

5

Wei

tere

Mög

lichk

eite

nde

rFO

R-S

chle

ife:

synt

ax-F

OR

-File

s

Page 74: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

FOR

%%parameter

IN

(set)

DO

command

synt

ax-F

OR

-File

s-R

oote

dat

Path

FOR

/R

[[drive:]path]

%%parameter

IN

(set)

DO

command

synt

ax-F

OR

-Fol

ders

FOR

/D

%%parameter

IN

(folder_set)

DO

command

synt

ax-F

OR

-Lis

tofn

umbe

rs

Page 75: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

FOR

/L

%%parameter

IN

(start,step,end)

DO

command

synt

ax-F

OR

-File

cont

ents

FOR

/F

["options"]

%%parameter

IN

(filenameset)

DO

command

FOR

/F

["options"]

%%parameter

IN

("Text

string

to

process")

DO

command

synt

ax-F

OR

-Com

man

dR

esul

ts

FOR

/F

["options"]

%%parameter

IN

('command

to

process')

DO

command

Bei

spie

l:Su

chti

mO

rdne

rC:\W

indo

ws\

Tem

pre

kurs

ivna

chD

atei

enm

itde

mN

amen

//tem

p.da

t//un

dgi

btdi

eLi

ste

aus.

Die

Opt

ion

"tok

en=*

"is

tnot

wen

dig,

Page 76: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

dam

itdi

eA

usga

beze

ilenw

eise

gele

sen

wir

dun

dau

chPf

ade

mit

enth

alte

nem

Lee

rzei

chen

ausg

egeb

enw

erde

nkö

nnen

.

for

/F

"tokens=*"

%%f

in

('dir

/S

/b

C:\Windows\Temp\temp.dat')

do

(echo

"%%f".

) Zähl

vari

able

nin

Zeic

henk

ette

nei

nbet

ten

Um

die

Zähl

varia

ble

%%

f(%

fauf

derK

omm

ando

zeile

)in

eine

rZei

chen

folg

ezu

verw

ende

n,w

ird

einf

ach

die

Var

iabl

ein

dem

Stri

ngei

ngeb

ette

t

FOR

%%f

IN

(A

BC

DE)

DO

(echo

mitten%%fdrinnen

)

Page 77: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.11

GO

TO

Mit

dem

Bat

chbe

fehlgoto

wir

dei

neSp

rung

mar

ke:

(s.o

.)an

gesp

rung

en.

Synt

ax

gotoNAMEDERSPRUNGMARKE

Bei

spie

l

Sieh

eun

ter

(Dop

pelp

unkt

)5 .

5K

apite

l3.3

aufS

eite

42

Page 78: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.12

IF

DerIF

Bef

ehle

rmög

licht

eine

einf

ache

Verz

wei

gung

und

wird

oftz

usam

men

mit

dem

GO

TO6

Bef

ehle

inge

setz

t.IF

erm

öglic

hthi

erbe

isow

ohld

iePr

üfun

gau

fein

eG

leic

hhei

tals

auch

aufd

asVo

rhan

dens

ein

von

Dat

eien

.

Bei

spie

l1:

@echo

off

IF

exist

c:\temp\my.log

echo.>c:\temp\my.log

echo.Log

Datei

erstellt>>c:\temp\my.log

Bei

spie

l1pr

üfto

bei

neL

ogda

teiv

orha

nden

istu

nder

stel

ltgg

f.ei

neN

eue.

Bei

spie

l2:

6K

apite

l3.1

1au

fSei

te70

Page 79: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

@echo

off

IF

"%COMPUTERNAME%"

==

"Bastie"

GOTO

WAHR

REM

hier

landet

man

wenn

der

if-Ausdruck

falsch

ist

GOTO

WEITER

:WAHR

REM

hier

landet

man

wenn

der

if-Ausdruck

wahr

ist

echo

Willkommen

Zuhause

REM

Jetzt

wird

der

if

Zweig

verlassen

GOTO

WEITER

:WEITER

echo.Have

anice

Day!

Bei

spie

l3:

IF

"%COMPUTERNAME%"

==

"Bastie"

(echo

Willkommen

zu

Hause!

)ELSE

(echo

Du

bist

auf

Computer:

%COMPUTERNAME%

Page 80: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

) echo.

Schönen

Tag

noch!

Bea

chte

nSi

e,be

ider

Prüf

ung

von

Um

gebu

ngsv

aria

blen

niem

als

IF

%Umgebungsvariable%

==

Prüfwert

...

zusc

hrei

ben,

wen

ndi

eU

mge

bung

svar

iabl

eni

chtg

eset

ztis

t;Si

eer

halte

nso

nst

eine

nSy

ntax

fehl

er.

Der

Para

met

er/i

unte

rbin

det

eine

Diff

eren

zier

ung

der

Gro

ß-/K

lein

buch

stab

en.

AC

HT

UN

G:

Bei

der

Ver

wen

dung

meh

rere

rB

efeh

lem

uss

zwis

chen

Bed

ingu

ngun

dde

rK

lam

mer

"("

ein

Lee

rzei

chen

sein

.

Fals

ch

Page 81: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

IF

Bedingung(

Ric

htig

IF

Bedingung(

Befehl1

Befehl2

)

3.12

.1Sy

ntax

Verg

leic

he

IF

<NOT>Variable1==Variable2

IF

%Variable%

EQ

U%Variable2%(Befehl)

An

die

Stel

levo

nE

QU

kann

jede

derO

ptio

nen

gese

tztw

erde

n.

Page 82: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

NOT

Der

Bef

ehlw

ird

nura

usge

führ

t,w

enn

die

Bed

ingu

ngN

ICH

TW

ahri

st.

Opt

iona

l.

==

istg

leic

h

EQU

istg

leic

h

NEQ

nich

tgle

ich

LSS

klei

nera

ls

LEQ

klei

nera

lsod

ergl

eich

GTR

größ

eral

s

GEQ

größ

eral

sod

ergl

eich

Page 83: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.12

.2H

inw

eisz

uU

ND

bzw

.OD

ER

Verk

nüpf

ung

Ein

eU

ND

bzw

.OD

ER

Ver

knüp

fung

von

zwei

Bed

ingu

ngen

sche

int

nich

tdi

rekt

mög

lich

zuse

in.B

eim

Ver

glei

chen

von

Stri

ngs

hilf

tes

aber

even

tuel

lw

enn

man

die

beid

enSt

ring

sm

itein

ande

rver

kette

t.

Bei

spie

l

set

A=true

set

B=false

if

"%A%;%B%"=="true;true"

(echo

Aund

Bsind

beide

TRUE

)else

(echo

entweder

Aoder

Bsind

nicht

=TRUE

)

Als

Wor

karo

und

könn

enm

ehre

reau

fein

ande

rfol

gend

eIF

szu

eine

rUN

Dbz

w.

OD

ER

Ver

knüp

fung

enko

mbi

nier

tw

erde

n.B

eiei

ner

OD

ER

Ver

knüp

fung

wir

dde

rCod

eau

sgef

ührt

,sob

ald

eine

derB

edin

gung

enw

ahri

st.W

enn

alle

Page 84: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bed

ingu

ngen

gepr

üftw

urde

n,un

dke

ine

erfo

lgre

ich

war

,wer

den

die

Bef

ehle

imE

LSE

Zw

eig

ausg

efüh

rt.

set

A=true

set

B=false

if

"%A%"=="true"

goto

:WAHR

//

Diese

Zeile

ist

doch

erfüllt,

also

sollte

der

in

:WAHR

springen

if

"%B%"=="true"

goto

:WAHR

REM

keine

der

Bedingungen

ist

zu

:WAHR

gesprungen,

wir

sind

also

im

ELSE

Zweig

REM

hier

waere

:FALSCH

echo

Weder

Anoch

Bist

TRUE

goto

:eof

:WAHR

echo

Aoder

Bist

TRUE

Füre

inU

ND

wir

din

den

EL

SEZ

wei

gge

spru

ngen

(:FA

LSC

H)s

obal

dei

nede

rBed

ingu

ngen

nich

tzut

riff

t.N

urw

enn

alle

Bed

ingu

nen

zutr

effe

nw

ird

der

Page 85: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Cod

eau

sgef

ührt

.

set

A=true

set

B=false

if

"%A%"NEQ"true"

goto

:FALSCH

if

"%B%"NEQ"true"

goto

:FALSCH

REM

wird

sind

durch

die

IFs

gekommen,

also

hat

keine

der

Bedingungen

angeschlagen.

REM

hier

waere

die

:WAHR

Sprungmarke

echo

Aund

Bsind

beide

TRUE

goto

:eof

:FALSCH

echo

Aoder

B(oder

beide)

sind

FALSE

Die

sebe

iden

Bei

spie

lela

ssen

sich

einf

ach

durc

hK

opie

ren

der

"IF.

.."Z

eile

umbe

liebi

gvi

ele

Bed

ingu

ngen

erw

eite

rn.E

inm

isch

envo

nU

ND

und

OD

ER

Ver

knüp

fung

enis

tlei

dern

icht

ohne

wei

tere

sm

öglic

h.

Page 86: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

3.13

PAU

SE

Unt

erbr

icht

die

Aba

rbei

tung

derB

atch

date

iund

war

teta

ufei

nen

Tast

endr

uck.

Synt

ax

pause

Inte

rner

Bef

ehl:

Ab

MS-

DO

Sbi

sW

indo

ws

NT

5.1

(XP)

Bei

spie

l1:

Inha

lt@echo

off

echo

Willkommen

zur

Batchdatei

%0

!!!

echo.

echo

Die

Batchdatei

wird

auf

einer

neuen

Seite

fortgeführt.

pause

cls

echo

Hier

fängt

meine

Batchdatei

an...

pause

Page 87: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Aus

gabe

Willkommen

zur

Batchdatei

beispiel.bat

!!!

Die

Batchdatei

wird

auf

einer

neuen

Seite

fortgeführt.

Bitte

beliebige

Taste

drücken...

(Neu

eSe

ite)

Hier

fängt

meine

Batchdatei

an...

Bitte

beliebige

Taste

drücken...

Bei

spie

l2:

Inha

lt@echo

off

echo

Diese

Zeile

wird

angezeigt

anstelle

von

"Bitte

beliebige

Taste

drücken..."

pause

>NUL

Aus

gabe

Diese

Zeile

wird

angezeigt

anstelle

von

"Bitte

beliebige

Taste

drücken..."

Page 88: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Um

eine

Paus

efü

rei

nebe

stim

mte

Zei

tdau

ervo

rzug

eben

,ka

nnde

rpi

ng-

Bef

ehl7

„mis

sbra

ucht

“w

erde

n.D

asfo

lgen

deB

eisp

iele

rzeu

gtei

nePa

use

von

gena

u10

Seku

nden

durc

hdi

eA

usga

beum

leitu

ng>nul

wird

jegl

iche

Mel

dung

unte

rdrü

ckt.

ping

1.2.3.4

-n

1-w

10000

>nul

3.14

PUSH

D/P

OPD

pushd

wec

hsel

tzum

ange

gebe

nen

Pfad

und

spei

cher

tden

aktu

elle

nPf

adbi

szu

mA

ufru

fvon

popd

.

popd

wec

hsel

tzum

gesp

eich

erte

nPf

ad.

Die

Bef

ehle

könn

enge

scha

chte

ltw

erde

n.

Synt

ax

7K

apite

l7.1

aufS

eite

147

Page 89: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

pushdpfad

popd

Bei

spie

l:

C:\WINDOWS>pushd

c:\temp

C:\temp>pushd

c:\

C:\>popd

C:\temp>popd

C:\WINDOWS>

3.15

RE

M

REM

leite

tein

enK

omm

enta

rein

.Die

Zeile

wird

igno

riert,

beac

hten

Sie

jedo

ch,

dassREM

von

eine

mL

eerz

eich

en/T

abul

ator

gefo

lgtw

erde

nm

uss.

Alte

rnat

ivda

zuw

erde

nhä

ufig

auch

Spru

ngm

arke

nei

nges

etzt

,da

hier

nure

inst

attv

ier

Page 90: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Zei

chen

verw

ende

twer

den

mus

s.H

äufig

wir

dje

doch

die

Spru

ngm

arke

zur

bess

eren

Übe

rsic

htdo

ppel

thin

tere

inan

derg

esch

rieb

en::

Bei

spie

l:

REM

kill

iexplore.exe

:kill

iexplore.exe

::kill

iexplore.exe

3.16

STA

RT

Star

tete

inPr

ogra

mm

.

Synt

ax:

START["Titel"][/D<Pfad>][/I][/MIN][/MAX]

[/SEPARATE|/SHARED][/LOW|/NORMAL|/HIGH

Page 91: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

|/REALTIME][/WAIT][/B][Befehl/Programm]

[Parameter]

Opt

ione

n:

•"T

itel"

Der

Tite

ldes

neue

nFe

nste

rs.

•/D

<Pfa

d>St

artv

erze

ichn

is•

/ID

iene

ueU

mge

bung

soll

die

dem

CM

D.E

XE

beim

Auf

ruf

über

gebe

nese

inun

dni

chtd

ieak

tuel

leU

mge

bung

.•

/MIN

Star

tetd

asFe

nste

rmin

imie

rt.

•/M

AX

Star

tetd

asFe

nste

rmax

imie

rt.

•/S

EPA

RA

TE

Star

tet1

6-B

it-W

indo

ws-

Prog

ram

min

sepa

rate

mSp

eich

erbe

-re

ich.

•/S

HA

RE

DSt

arte

t16-

Bit-

Win

dow

s-Pr

ogra

mm

inge

mei

nsam

enSp

eich

erbe

-re

ich.

•/L

OW

Star

tetA

nwen

dung

inID

LE

-Pri

oritä

tskl

asse

.•

/NO

RM

AL

Star

tetA

nwen

dung

inde

rNO

RM

AL

-Pri

oritä

tskl

asse

.•

/HIG

HSt

arte

tAnw

endu

ngin

derH

IGH

-Pri

oritä

tskl

asse

.•

/RE

ALT

IME

Star

tetA

nwen

dung

inde

rRE

ALT

IME

-Pri

oritä

tskl

asse

.

Page 92: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

•/W

AIT

Star

tetd

ieA

nwen

dung

und

war

teta

ufda

sE

nde.

•/B

Star

tetd

ieA

nwen

dung

ohne

ein

neue

sFe

nste

rzu

öffn

en.D

ieA

nwen

-du

ngig

nori

ertS

TR

G+C

.Wen

ndi

eA

nwen

dung

nich

tsel

bstä

ndig

STR

G+C

über

prüf

t,is

tST

RG

+UN

TB

Rdi

eei

nzig

eM

öglic

hkei

t,um

die

Anw

endu

ngab

zubr

eche

n.•

/?G

ibtd

ieH

ilfe

aus.

Hie

rei

neL

iste

der

nütz

liche

n(S

yste

m)P

rogr

amm

e,di

em

anso

ausf

ühre

nka

nn:

rege

dit.e

xe=

neue

rReg

istr

ieru

ngse

dito

r

(reg

edt3

2.ex

e=

älte

rerR

egis

trie

rung

sedi

tor)

expl

orer

.exe

=W

indo

ws

Ord

nerE

xplo

rer

Page 93: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

task

mgr

.exe

=W

indo

ws

Task

man

ager

task

eng.

exe

=A

ufga

benp

lanu

ngsm

odul

calc

.exe

=Ta

sche

nrec

hner

msh

ta.e

xe=

Scri

ptho

stfü

rHTA

(HT

ML

)Scr

iptin

g

W/C

Scrip

t.exe

=B

eide

sB

esta

ndte

ilde

sW

indo

ws

Scrip

thos

tes

fürJ

Sun

dV

BS

iexp

lore

.exe

=M

icro

soft

Win

dow

sIn

tern

etE

xplo

rer,

Stan

dard

brow

ser

für

Win

dow

s

firef

ox.e

xe=

Moz

illa

Fire

fox,

Inte

rnet

brow

ser

Page 94: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

dial

er.e

xe=

Win

dow

s-H

ilfep

rogr

amm

fürD

FÜE

inw

ahlv

erbi

ndun

gen

Not

epad

.exe

=St

anda

rd-T

extb

earb

eitu

ngsp

rogr

amm

von

Mic

roso

ft

cmd.

exe

=M

icro

soft

Win

dow

sB

efeh

lspr

ozes

sorf

ürB

atch

win

wor

d=

Mic

roso

ftW

ord

3.17

Vari

able

n

Es

gibt

zwei

erle

iArt

envo

nV

aria

blen

:Scr

iptv

aria

blen

und

Syst

emva

riab

len.

Die

Scrip

tvar

iabl

enw

erde

nin

nerh

alb

von

Schl

eife

nei

nges

etzt

,beg

inne

nm

it%

und

eine

mfr

eiw

ählb

aren

Zei

chen

,ode

rein

erZ

eich

enfo

lge.

Syst

emva

riab

len

müs

sen

von

%be

gonn

enun

dvo

n%

abge

schl

osse

nw

erde

n.Si

esi

ndfe

stde

finie

rt.D

ieV

aria

ble

%0%

hat

stet

sde

nN

amen

der

aktu

elle

nD

atei

.Die

Page 95: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Var

iabl

e%

ver%

hati

mm

erde

nN

amen

dera

ktue

llen

Bet

rieb

ssys

tem

vers

ion.

Unt

erW

indo

ws

XP

mus

s%

os%

stat

t%ve

r%ve

rwen

detw

erde

n.

Gib

tman

unte

rWin

dow

sV

ista

und

7de

nB

efeh

lech

o%

os%

ein,

sogi

btde

rC

ompu

ter

die

Ver

sion

des

Syst

ems

aus,

auf

dem

das

Syst

emba

sier

t.U

nter

Win

dow

sV

ista

und

Win

dow

s7

gibt

esei

nen

Bef

ehln

amen

ver,

mit

dem

man

die

Vers

ion

dire

ktan

geze

igtb

ekom

mt.

Es

gibt

zwar

kein

edi

rekt

eVa

riab

lebe

iV

ista

und

Win

dow

s7,

die

das

Bet

rieb

ssys

tem

defin

iert

,jed

och

kann

man

das

mit

folg

ende

mTr

ick

umge

hen:

@echo

off

'Autobefehlsanzeige

ausgeschaltet

ver

>TMP.dat

'speichert

die

Ausgabe

des

Befehls

in

der

Datei

TMP.dat

Set

/p

ver=

<TMP.dat

'definiert

die

Variable

des

Betriebssystems.

(NUR

TEMPORÄR

!)

echo

%ver%

'gibt

nun

die

definierte

Variable

aus.

pause>nul

'pause

Nüt

zlic

heSt

ring

oper

atio

nfü

rVar

iabl

en:

Page 96: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Teils

trin

g

Synt

ax

var:˜n,m

Erg

ibtd

enTe

ilstr

ing

von

var,

begi

nnen

dm

itde

mn-

ten

Zei

chen

(von

links

)un

dei

nerL

änge

von

mZ

eich

en.G

ezäh

ltw

ird

ab0,

d.h.

das

erst

eZ

eich

enha

tdi

ePo

sitio

n0

und

nich

t1.W

erde

nne

gativ

eW

erte

verw

ende

t,so

wir

dvo

mE

nde

des

Stri

ngs

/von

rech

tsna

chlin

ks)g

ezäh

lt.

Bei

spie

l:

Inha

lt:set

str=myfile.bat

set

name=%str:˜0,6%

echo

%name%

Indi

esem

Bei

spie

lwird

derT

eils

tring

von

strv

omer

sten

Zeic

hen

anm

itei

ner

Län

gevo

n6

Zei

chen

ausg

egeb

en.

Aus

gabe

:

Page 97: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

myfile

Stri

ngsu

bstit

utio

n

Synt

ax

var:str1=str2

Mith

ilfe

des

Synt

axva

r:st

r1=s

tr2

kann

die

Zei

chen

kette

str1

des

Inha

ltsde

rV

aria

ble

vard

urch

str2

erse

tztw

erde

n.

Bei

spie

l:

Inha

lt:set

str="mycommand

/p

/m

file"

echo

%str%

set

str=%str:/p

/m=/t

%echo

%str%

Indi

esem

Bei

spie

lwer

den

die

Opt

ione

n/p

/mde

sB

efeh

lsm

ycom

man

ddu

rch

die

Opt

ion

/ter

setz

t.

Page 98: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Aus

gabe

:"mycommand

/p

/m

file"

"mycommand

/t

file"

Ben

utze

rein

gabe

nin

Vari

able

nsp

eich

ern

Um

eine

Ben

utze

rein

gabe

inei

neVa

riabl

esp

eich

ern

zukö

nnen

wird

die

Opt

ion

/pbe

nötig

t

Bei

spie

l:

set

/p

EINGABE=Variable

Eingeben:

echo

%EINGABE%

Mit

Vari

able

nR

echn

en

Rec

hnun

gen

mit

Var

iabl

ensi

nder

stm

itde

rOpt

ion

/am

öglic

h

Bei

spie

l:

Page 99: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

set

WERT1=2

set

WERT2=21

set

/a

WERT1

=%WERT1%*%WERT2%

echo

%WERT1%

Page 100: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

4B

atch

Ope

rato

ren

4.1

&

Bef

ehls

verk

ettu

ng:m

ehre

reB

atch

-Bef

ehle

inei

nerZ

eile

könn

enhi

nter

eina

n-de

raus

gefü

hrtw

erde

n

Synt

ax

befehl1&befehl2

Stap

elan

wei

sung

:Ab

?bi

sW

indo

ws

7

93

Page 101: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bei

spie

l:

Inha

ltecho

Hallo!

&echo

und

Tschüss!

Aus

gabe

Hallo!

und

Tschüss!

4.2

|

Bef

ehls

verk

ettu

ngm

ittel

s"p

ipe"

:der

zwei

teB

efeh

lbek

omm

tdie

Aus

gabe

des

erst

enB

efeh

lsal

sE

inga

be

Synt

ax

befehl1|befehl2

Page 102: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Stap

elan

wei

sung

:Ab

DO

S(n

urfü

rmor

eal

szw

eite

rBef

ehl)

;allg

emei

nve

r-w

endb

arab

Win

dow

sNT

bis

Win

dow

s7

Bei

spie

l:

Inha

lttype

test.txt

|more

Aus

gabe

Zeile

1Zeile

2...

Zeile

24

--

More

--

(nac

hD

rück

enei

nerb

elie

bige

nTa

ste

wer

den

die

näch

sten

Zei

len

ange

zeig

t)

Page 103: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

4.3

&&

bedi

ngte

Bef

ehls

verk

ettu

ng:d

erzw

eite

Bef

ehlw

ird

nura

usge

führ

t,w

enn

der

erst

eB

efeh

lerf

olgr

eich

war

Synt

ax

befehl1&&befehl2

Stap

elan

wei

sung

:Ab

?bi

sW

indo

ws

7

Bei

spie

l:

Inha

ltcopy

test.txt

test2.txt

&&

echo

Kopieren

erfolgreich!

Aus

gabe

Kopieren

erfolgreich!

(fal

lste

st.tx

texi

stie

rtun

dna

chte

st2.

txtk

opie

rtw

erde

nko

nnte

)

Page 104: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

4.4

||

bedi

ngte

Bef

ehls

verk

ettu

ng:d

erzw

eite

Bef

ehlw

ird

nura

usge

führ

t,w

enn

der

erst

eB

efeh

lfeh

lsch

lug

Synt

ax

befehl1||befehl2

Stap

elan

wei

sung

:Ab

?bi

sW

indo

ws

7

Bei

spie

l:

Inha

ltcopy

test.txt

test2.txt

||

echo

Fehler

beim

Kopieren!

Aus

gabe

Fehler

beim

Kopieren!

Page 105: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

(fal

lste

st.tx

tnic

htex

istie

rtod

erte

st2.

txtn

icht

gesc

hrie

ben

bzw

.übe

rsch

riebe

nw

erde

nko

nnte

)

4.5

<

Um

leitu

ngde

rEin

gabe

Synt

ax

befehl<file

Bei

spie

l:

Inha

ltecho

Hallo!

>tmp.txt

set

/P

v=

<tmp.txt

echo

%v%

Aus

gabe

Page 106: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Hallo!

(set/Pv=

wür

deei

neZ

eile

vom

Bed

iene

rerw

arte

n;du

rch

die

Um

leitu

ngw

ird

dies

eZ

eile

von

derD

atei

tmp.

txtg

eles

en,d

iezu

vorm

ittel

sU

mle

itung

derA

usga

be(s

iehe

unte

n)be

füllt

wur

de.)

4.6

>

Um

leitu

ngde

r(S

tand

ard-

)Aus

gabe

zuei

nem

ande

ren

Zie

l.W

enn

das

Zie

lei

neD

atei

ist,

wir

ddi

ese

neu

ange

legt

(fal

lsdi

eD

atei

scho

nex

istie

rt,w

ird

sie

zuvo

rgel

ösch

t)E

ska

nnab

erau

chna

chN

UL

(Die

Aus

gabe

vers

chw

inde

t)od

erC

ON

(Bild

schi

rm)u

mge

leite

twer

den

Synt

ax

befehl>file

Page 107: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

oder

auch

mit

vorr

ange

stel

lter

Um

leitu

ng(p

rakt

isch

wen

nbe

ider

Aus

gabe

einz

elne

"vo

rkom

men

)

>filebefehl

Bei

spie

l:

Inha

ltecho

Hallo!

>tmp.txt

type

tmp.txt

Aus

gabe

Hallo!

Neb

ende

rSt

anda

rd-A

usga

be(s

tdou

t)gi

btes

noch

eine

Fehl

erau

sgab

e(s

tder

r).N

orm

aler

wei

sela

nden

die

Stan

dard

-Aus

gabe

und

die

Fehl

er-A

usga

beam

Bild

schi

rm,w

odur

chde

rU

nter

schi

edni

chta

uffä

llt.W

enn

die

Stan

dard

-A

usga

beau

fein

eD

atei

umge

lenk

twir

d,la

nden

Fehl

erau

sgab

enim

mer

noch

Page 108: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

aufd

emB

ildsc

hirm

,was

ofte

rwün

scht

ist.

Falls

nich

t,ka

nnau

chdi

eFe

hler

-A

usga

bein

eine

Dat

eium

gele

itetw

erde

n,un

dzw

arm

it2>

.

Bei

spie

l:dir

>stdout.txt

2>stderror.txt

Schr

eibt

den

Out

putd

esdir

Bef

ehle

sin

die

Dat

eist

dout

.txt,

dake

inFe

hler

aufg

etre

ten

ist.

dir

DieseDateiExistiertNicht.txt

>stdout.txt

2>stderror.txt

Schr

eibt

die

Fehl

erm

eldu

ngde

sdir

Bef

ehle

sin

die

Dat

eist

derr

or.tx

t,da

die

Dat

eiD

iese

Dat

eiE

xist

iert

Nic

ht.tx

tnic

htex

istie

rtun

sso

mit

ein

Fehl

erau

ftri

tt.

Wen

ndi

eFe

hler

ausg

abe

indi

egl

eich

eD

atei

wie

die

Stan

dard

ausg

abe

umge

-le

itetw

erde

nso

ll,hä

ngtm

anno

ch2>&1

an.

Bei

spie

l:

type

EineDatei.txt

>UmgeleiteteAusgabe.txt

2>&1

Page 109: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Der

Inha

ltde

rDat

eiE

ineD

atei

.txtw

ird

indi

eD

atei

Um

gele

itete

Aus

gabe

.txt

kopi

ert(

wen

nE

ineD

atei

.txte

xist

iert

).

type

EineDateiDieNichtExistiert.txt

>UmgeleiteteAusgabe.txt

2>&1

Wen

ndi

eD

atei

Ein

eDat

eiD

ieN

icht

Exi

stie

rt.tx

tnic

htex

istie

rt,d

ann

wir

ddi

eFe

hler

mel

dung

nich

tim

Dos

-Fen

ster

(std

out)

ausg

egeb

en,s

onde

ren

die

Aus

-ga

bew

ird

auch

indi

eD

atei

Um

gele

itete

Ausg

abe.

txtg

esch

rieb

en.

4.7

>>

Um

leitu

ngde

r(St

anda

rd-)

Aus

gabe

mit

Anh

änge

nde

sTe

xtes

(fal

lsdi

eD

atei

scho

nex

istie

rt;s

onst

wir

ddi

eD

atei

wie

bei>

(sie

heob

en)a

ngel

egt)

Page 110: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Synt

ax

befehl>>file

Stap

elan

wei

sung

:Ab

?bi

sW

indo

ws

7

Bei

spie

l:

Inha

ltecho

Hallo!

>tmp.txt

echo

Haallooo!!

>>

tmp.txt

type

tmp.txt

Aus

gabe

Hallo!

Haallooo!!

Hie

rgilt

anal

oges

fürd

ieFe

hler

-Aus

gabe

(sie

heO

pera

tor'>

'obe

n).

Page 111: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 112: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

5E

rwei

teru

ngen

unte

rW

indo

wsN

T

Unt

erW

indo

ws

NT,

Win

dow

s20

00un

dW

indo

ws

XP

steh

enei

nige

wei

te-

reB

efeh

lezu

rV

erfü

gung

,zum

Teil

sind

dort

auch

erw

eite

rte

Opt

ione

nfü

rSt

anda

rd-B

efeh

leen

thal

ten.

5.1

Bat

chpa

ram

eter

Die

Para

met

erla

ssen

sich

jetz

tfol

gend

erm

aßen

erw

eite

rn(f

ür1

setz

em

ande

nje

wei

ligen

Para

met

erei

n):

105

Page 113: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

%˜1

Anführungszeichen

(")

werden

entfernt

%˜f1

vollständige

Pfadbezeichnung

%˜d1

Laufwerkbuchstabe

%˜p1

Pfad

(ohne

Laufwerksbuchstabe)

%˜n1

Dateiname

%˜x1

Dateinamenserweiterung

%˜s1

Pfad

nur

mit

kurzen

Verzeichnis/Dateinamen

([http://de.wikipedia.org/wiki/8.3

8.3-Konvention])

%˜a1

Dateiattribute

%˜t1

Datums-

und

Uhrzeitangaben

der

Datei

(Geändert

am)

%˜z1

Größe

der

Datei

Die

Ang

aben

könn

enau

chko

mbi

nier

twer

den,

z.B

.%˜d

p0is

tLau

fwer

ksbu

ch-

stab

en+

Pfad

dera

ktue

llen

Bat

chda

tei.

5.2

Stri

ngm

anip

ulat

ion

Mit

folg

ende

rSyn

tax

lass

ensi

chTe

ileau

sei

nerZ

eich

enke

tteex

trah

iere

n:

Page 114: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

set

str=Hallo

set

str=%str:˜1%

echo.%str%

Die

ange

gebe

nepo

sitiv

eZ

ahl

gibt

an,w

ievi

ele

Zei

chen

links

über

gang

enw

erde

nso

llen.

Die

serA

usdr

uck

liefe

rtda

herd

enTe

ilstri

ng"a

llo"

von

"Hal

lo".

set

str=Hallo

set

str=%str:˜-4%

echo.%str%

Wir

dei

nene

gativ

eZ

ahle

inge

setz

t,so

gibt

ihr

Bet

rag

an,w

ievi

ele

Zei

chen

von

rech

tsge

nom

men

wer

den

solle

n.D

iese

rAus

druc

klie

fert

dahe

rebe

nfal

ls"a

llo".

Übe

rdie

Ang

abe

eine

rzw

eite

nZ

ahlk

ann

defin

iert

wer

den,

was

mit

dem

Res

tna

chA

usw

ertu

ngde

rers

ten

Zah

lent

spre

chen

dob

iger

Reg

eln

gesc

hehe

nso

ll.W

ähre

nddi

eer

ste

Zah

ldie

Zei

chen

kette

links

besc

hnei

det,

besc

hnei

detd

ie

Page 115: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

zwei

teZ

ahls

iere

chts

und

zwar

nach

folg

ende

nR

egel

n:

set

str=Hallo

set

str=%str:˜1,2%

echo.%str%

Ein

epo

sitiv

ezw

eite

Zah

lgi

btan

wie

viel

eZ

eich

enab

links

vom

Res

tge

nom

men

wer

den

solle

n.D

iese

rAus

druc

klie

fert

dahe

r"al

".

set

str=Hallo

set

str=%str:˜1,-2%

echo.%str%

Wir

dei

nene

gativ

ezw

eite

Zah

lein

gese

tzt,

sogi

btih

rB

etra

gan

,wie

viel

eZe

iche

nvo

mR

esta

bre

chts

über

gang

enw

erde

nso

llen.

Die

serA

usdr

uck

liefe

rtda

here

benf

alls

"al"

.

Page 116: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Möc

hte

man

beis

piel

swei

senu

rei

nen

Teil

der

Zei

chen

kette

ablin

ks,s

ois

tna

chdi

esen

Reg

eln

als

erst

eZ

ahle

ine

Nul

lanz

ugeb

en:

set

str=Hallo

set

str=%str:˜0,2%

echo.%str%

Die

serA

usdr

uck

liefe

rtda

her"

Ha"

.

Meh

rzu

Stri

ngm

anip

ulat

ion1

1http://www.dostips.com/DtTipsStringManipulation.php#

_Toc135152735

Page 117: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

5.3

Um

gebu

ngsv

aria

blen

Unt

erD

OS

und

Win

dow

s9x/

ME

spei

cher

nal

leA

nwen

dung

enun

dSk

ripte

ihre

Um

gebu

ngsv

aria

blen

inde

rgle

iche

nU

mge

bung

.Unt

erW

indo

ws

NT-

basi

erte

nB

etri

ebss

yste

men

istd

ies

etw

asan

ders

:

Zun

ächs

tgib

tes

eine

nsy

stem

wei

ten

Ber

eich

.Die

ser

enth

ältV

aria

blen

,die

für

alle

Ben

utze

run

dal

leA

nwen

dung

enzu

gäng

lich

sind

.Zus

ätzl

ich

hatj

e-de

rBen

utze

rsei

nen

eige

nen

Var

iabl

enra

um.J

ede

Anw

endu

ng,d

ienu

nvo

mSy

stem

gest

arte

twir

d,er

hält

eine

nei

gene

nV

aria

blen

raum

,der

als

Kop

ieau

sde

mde

rauf

rufe

nden

Anw

endu

nger

zeug

twir

d.Ä

nder

tdas

Prog

ram

met

was

(Wer

tänd

erun

g,ne

ueV

aria

ble)

,wir

ktsi

chdi

esni

chta

ufpa

ralle

lges

tart

ete

Anw

endu

ngen

oder

das

Syst

emau

s.L

edig

lich

Proz

esse

,die

von

derA

nwen

-du

ngge

star

tetw

erde

ner

halte

nei

neK

opie

des

Anw

endu

ngsv

aria

blen

raum

es.

Dad

urch

iste

sni

chtm

öglic

h,da

ssA

nwen

dung

enU

mge

bung

svar

iabl

ense

tzen

,di

eda

nnan

schl

ieße

ndin

eine

rBat

chda

teiv

erw

ertb

arsi

nd.

Page 118: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bei

spie

l:

@echo

off

set

a=2

echo

%a%

command

/c:

set

a=1

echo

%a%

Unt

erD

osw

ürde

die

Aus

gabe

laut

en:

2 1

Unt

erW

indo

ws

NT

/200

0/X

P:

Page 119: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2 2

Das

heiß

tnic

ht,d

ass

unte

rW

indo

ws

NT

und

Nac

hfol

gern

der

Bef

ehlset

a=1

kein

enE

ffek

thät

te,s

onde

rndi

eser

wir

din

eine

rges

chüt

zten

Um

gebu

ngau

sgef

ührt

,die

dann

auße

rhal

bdi

eser

Um

gebu

ngke

inen

Eff

ektm

ehrh

at.F

ürdi

eau

fger

ufen

eV

aria

nte

von

com

man

dis

tana

chde

mse

t-B

efeh

lseh

rwoh

lgl

eich

1.

Noc

hei

neÄ

nder

ung

Var

iabl

enbe

tref

fend

.2

2http://de.wikibooks.org/wiki/Batch-Programmierung:

_Programmierungshilfen#Probleme_mit_Variablen

Page 120: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

5.4

Die

Kom

man

doze

ilele

rntR

echn

en

Seit

Win

dow

sN

T4

kann

man

mit

demset

Bef

ehla

uch

Rec

hnen

.

Ein

Bei

spie

l:set

/a

1+2

3 Man

kann

das

Erg

ebni

sau

chin

Var

iabl

ensc

hrei

ben:

set

/a

n=5+5

10echo

%n%

10 -C

MD

nim

mtf

olge

ndes

entg

egen

(Aus

zug

aus

derH

ilfe)

:

()

-Gruppierung

--

unäre

Operatoren

*/

%-

arithmetische

Operatoren

(%

bedeutet

Page 121: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Modulo)

+-

-arithmetische

Operatoren

<<

>>

-logische

Verschiebung

&-

bitweise

UND

ˆ-

bitweise

exklusives

ODER

|-

bitweise

ODER

=*=

/=

%=

+=

-=

-Zuordnung

-Mit

Kla

mm

ern:

set

/a

(1+1)*(4-3)

2 5.5

Ben

utze

rein

gabe

n

Seit

Win

dow

s20

00ka

nnm

anm

itde

mset

Bef

ehla

uch

Ein

gabe

nab

frag

en:

Synt

ax:

set

/p

{variablenname}={Angezeigter

Text}

Page 122: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

5.5.

1B

eisp

iel

@echo

off

set

/p

var=Eingabe:

echo

Sie

haben

%var%

eingegeben.

pause

Aus

gabe

:Eingabe:

Test

Sie

haben

Test

eingegeben.

{Pause}

Prüf

ung

obde

rBen

utze

rTex

tein

gege

ben

hat:

@echo

off

set

/p

var=Eingabe:

if

not

defined

var

(echo

Bitte

geben

Sie

etwas

ein!

set

var=nichts

REM

Könnte

auch

was

ganz

anderes

sein

)

Page 123: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

Sie

haben

"%var%"

eingegeben.

pause

Aus

gabe

:Eingabe:

{leer}

Bitte

geben

Sie

etwas

ein!

Sie

haben

"nichts"

eingegeben.

{pause}

5.6

Aus

gabe

nin

eine

Vari

able

umle

iten

Ein

eM

öglic

hkei

tde

rU

mle

itung

eine

rA

usga

bebe

steh

tüb

erde

nset/p

Bef

ehl:

Synt

ax:

Page 124: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

ECHO

{Befehl}>

{Dateiname}

SET

/P

{Variablenname}=<{Dateiname}

5.6.

1B

eisp

iel

@ECHO

OFF

ECHO

%date%

>_.txt

SET

/P

tmp=<_.txt

ECHO

Das

Datum

heute

ist:

%tmp%

•si

ehe

auch

Net

-Bef

ehle

3

3K

apite

l7.5

aufS

eite

157

Page 125: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 126: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6Pr

ogra

mm

ieru

ngsh

ilfen

6.0.

nder

nde

sEdi

tors

zum

Bea

rbei

ten

von

Bat

chda

teie

n

Wen

nm

anim

Win

dow

sEx

plor

erm

itde

rRec

hten

-Mau

s-Ta

ste

(RM

T)au

fein

e*.

batk

lickt

,so

wer

den

eine

mdi

eB

efeh

leÖ

ffnen

und

Bea

rbei

ten

ange

bote

n.

Öff

nen:

führ

tdie

Bat

chda

teia

us.M

itde

mB

efeh

l

119

Page 127: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bea

rbei

ten:

wird

die

Bat

chda

teii

nde

nTe

xted

itorn

otep

ad.e

xezu

mB

earb

eite

nge

öffn

et.

Auc

hw

enn

Not

pad

zum

Bea

rbei

ten

von

Bat

chda

teie

nau

srei

cht,

som

öcht

em

anhä

ufig

doch

die

Bat

chda

teie

nm

itei

nem

ande

ren,

kom

fort

able

ren

Edi

tor

bear

beite

n,de

rz.B

.Syn

taxh

ervo

rheb

ung

(Syn

taxh

ighl

ight

ing)

behe

rrsc

ht.

Um

eine

nan

dere

nE

dito

r(

z.B

.Sy

n1 )zu

verw

ende

n,m

uss

man

inde

rR

egis

try

ande

rSte

lle:

HKEY_CLASSES_ROOT\batfile\shell\edit\command

den

Stan

dard

Wer

t

1http://syn.sourceforge.net/

Page 128: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

(Standard)

=%SystemRoot%\System32\NOTEPAD.EXE

%1

aufd

enSt

artb

efeh

ldes

ents

prec

hend

enE

dito

rsän

dern

.Z.B

.

HKEY_CLASSES_ROOT\batfile\shell\edit\command

|(Standard)

=c:\Programme\Editor\syn\syn.exe

%1

6.0.

3D

atum

und

Uhr

zeit

anze

igen

Für

Log

-Dat

eien

ist

esw

icht

ig,d

ass

man

die

Log

eint

räge

mit

Dat

umun

dU

hrze

itve

rseh

enka

nn:

echo

%date:˜0%

-%time:˜0,8%

Uhr

Erg

ebni

s:11

.09.

2010

-15:

59:5

3U

hr

Page 129: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Hie

rbei

steh

t":˜

0,8"

für

die

Ang

abe

der

Stel

len.

Mit

"0,8

"w

ird

ange

gebe

n,da

ssdi

eA

usga

bede

rZei

tbei

Posi

tion

0be

ginn

enso

llun

din

sges

amt8

Stel

len

bein

halte

nso

ll.D

iem

axim

ale

Stel

lena

nzah

list

11(0

,11)

.

Bei

mD

atum

istd

iese

Ang

abe

hier

nich

tnöt

ig,d

adi

eses

stan

dard

mäß

igim

dd.m

m.y

yyy-

Form

atau

sgeg

eben

wir

d.W

erab

ernu

rda

sJa

hrha

ben

will

,ka

nn"%

date

:˜-4

%"

eing

eben

und

erhä

ltda

mit

die

letz

ten

4Z

eich

en.F

ürei

nso

rtie

rger

echt

esD

atum

inde

rUm

gebu

ngsv

aria

blen

sort

date

sorg

tz.B

.

set

SORTDATE=%date:˜-4%-%date:˜3,2%-%date:˜0,2%

echo

%SORTDATE%

Wer

tder

Um

gebu

ngsv

aria

ble:

2009

-04-

20

Bea

chte

:

Page 130: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Inei

nerB

atch

date

ikan

ndi

eVe

rwen

dung

von

%D

ATE%

und

insb

eson

dere

von

%T

IME

%da

zufü

hren

,daß

sich

die

ausg

egeb

ene

Uhr

zeit

nich

takt

ualis

iert

.

Hie

rzu

folg

ende

sB

eisp

iel:

@echo

off

echo

##

Die

aktuelle

Zeit

ist:

%TIME%

echo

##

bitte

5Sec.

warten

...

ping

1.2.3.4

-n

1-w

5000

>NUL

echo

##

jetzt

sind

genau

5Sec.

vergangen

,TIME

liefert

%TIME%,

das

ist

noch

OK

echo

##

doch

in

der

FOR

Schleife

wird

bereits

die

alte

Zeit

verwendet.

for

/L

%%N

IN

(0,

1,

3)

DO

(echo

%time%

pause

)echo

##

und

dies

bleibt

für

jede

Ausgabe

innerhalb

der

FOR-Schleife

so.

echo.

echo

##

Auch

in

z.&nbsp;B.

IF-Schleifen

ist

das

so.

if

TRUE==TRUE

(

Page 131: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

1.

Zeit

in

der

If

Schleife:

%TIME%

echo

Warte

5Sec.

ping

1.2.3.4

-n

1-w

5000

>NUL

echo

2.

Zeit

in

der

If

Schleife:

%TIME%

echo

Warte

nochmals

5Sec.

ping

1.2.3.4

-n

1-w

5000

>NUL

echo

3.

Zeit

in

der

If

Schleife:

%TIME%

)echo

##

Dabei

ist

es

bereits:

%TIME%

pause

Dam

it%

DA

TE

%un

d%

TIM

E%

die

rich

tigen

Wer

teau

sgeb

en,

mus

sun

bedi

ngt

die

verz

öger

teE

rwei

teru

ngvo

nU

mge

bung

svar

iabl

enm

itde

mB

efeh

lSE

TLO

CA

L2E

NA

BLE

EX

TEN

SIO

NS

aktiv

iert

wer

den.

Hie

rdas

korr

ekte

Bei

spie

l:

@echo

off

SetLocal

EnableDelayedExpansion

2K

apite

l2.3

0au

fSei

te32

Page 132: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

##

Die

aktuelle

Zeit

ist:

%time:~0,8%

echo

##

bitte

5Sec.

warten

...

ping

1.2.3.4

-n

1-w

5000

>NUL

echo

##

jetzt

sind

5Sec.

vergangen

,TIME

liefert

%TIME%,

das

ist

OK

echo

##

Jetzt

gibt

auch

die

FOR

Schleife

die

korrekte

Zeit

aus.

for

/L

%%N

IN

(0,

1,

3)

DO

(echo

!TIME!

pause

)echo.

echo

##

Auch

in

z.&nbsp;B.

IF-Schleifen

ist

es

jetzt

richtig.

if

TRUE==TRUE

(echo

1.

Zeit

in

der

If

Schleife:

%TIME%

echo

Warte

5Sec.

ping

1.2.3.4

-n

1-w

5000

>NUL

echo

2.

Zeit

in

der

If

Schleife:

%TIME%

echo

Warte

nochmals

5Sec.

ping

1.2.3.4

-n

1-w

5000

>NUL

echo

3.

Zeit

in

der

If

Schleife:

%TIME%

)echo

##

Es

ist

jetzt:

%TIME%

EndLocal

pause

Page 133: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6.0.

4A

usga

ben

bess

eran

zeig

en

Wen

nm

anni

chtd

ieA

usga

bevo

nB

efeh

len

per@

echo

off"

Aus

blen

det"

kann

man

ambe

sten

das

Prom

ptän

dern

,sod

ass

man

bess

erer

kenn

enka

nn,w

aspa

ssie

rt:

@prompt

-$G

Der

Prom

ptis

tdan

n->

6.0.

5U

nter

rout

inen

und

Unt

erpr

ogra

mm

e

Unt

erro

utin

enka

nnm

anm

ittel

sgo

tood

erca

llun

dU

nter

prog

ram

me

mit

Hilf

evo

nca

llre

alis

iere

n.

call:unterroutine

Hallo

echo

Fertig!

goto:eof

Page 134: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

:unterroutine

echo

Übergebener

Parameter

an

Unterroutine:

%1

goto:eof

Bea

chte

nSi

e,da

ssSi

ebe

imA

ufru

fvo

nU

nter

rout

inen

percall

Prob

lem

em

itFi

leha

ndle

sbe

kom

men

könn

en.D

ies

liegt

darin

begr

ünde

t,da

ssei

nA

ufru

fpe

rcall

als

Auf

rufe

ines

Unt

erpr

ogra

mm

sin

terp

retie

rtw

ird,w

ähre

ndes

sich

beigoto

stet

sum

Unt

erro

utin

esha

ndel

t.

Anm

erku

ng:goto:eof

ist

eine

Spez

ialm

arke

mit

der

Sie

stet

szu

mE

nde

Ihre

sSk

ript

es(b

zw.I

hrer

Unt

erro

utin

e)sp

ring

en

6.0.

6B

enut

zere

inga

ben

mitt

els"

set/

P"

@echo

off

set

/P

w=

[i]nstallieren

/[d]eInstallieren?

REM

die

option

/I

beim

if

bewirkt,

dass

nicht

REM

zwischen

Gross

und

Kleinschreibung

Page 135: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

REM

unterschieden

wird.

if

/I

"%w%"=="i"

goto

Install

if

/I

"%w%"=="d"

goto

Deinstall

echo

Fehler:

[%w%]

goto

ende

:Install

echo

"installieren"

ausgewählt

goto

ende

:Deinstall

echo

"deInstallieren"

ausgewählt

goto

ende

:ende echo.

pause

Page 136: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6.0.

7st

dout

inU

mge

bung

svar

iabl

esp

eich

ern

Falls

man

den

stdo

utin

eine

rU

mge

bung

svar

iabl

esp

eich

ern

möc

hte,

mus

sm

anda

skom

pliz

ierte

rum

setz

en.E

sgib

tzw

eive

rsch

iede

neM

öglic

hkei

ten

dies

anzu

gehe

n.befehl|set/Pvariable=

funk

tioni

ertn

ämlic

hni

cht.

Stat

tdes

sen

brau

chtm

an:

BEFEHL

>temp.txt

set

/p

BefehlOutput=

<temp.txt

del

temp.txt

Ode

r:

FOR

/F

%%i

IN

('BEFEHL')

DO

set

BefehlOutput=%%i

Ode

rmit

"use

back

q"-O

ptio

n:

Page 137: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

FOR

/F

"usebackq"

%%i

IN

(‘BEFEHL‘)

DO

set

BefehlOutput=%%i

Die

Zei

chen

kette

zwis

chen

den

einf

ache

nA

nfüh

rung

szei

chen

wir

dda

beia

lsB

efeh

lsze

ilebe

trac

htet

und

von

eine

runt

erge

ordn

eten

CM

D.E

XE

ausg

efüh

rt.

%B

efeh

lOut

put%

kann

nun

belie

big

gebr

auch

twer

den.

Bei

spie

l:

Cod

e:

@echo

off

FOR

/F

%%i

IN

('CD')

DO

set

verzeichnis=%%i

echo

%verzeichnis%

Aus

gabe

:

Page 138: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

C:\Programme\Batch

Vors

icht

istg

ebot

en,b

eiB

efeh

len,

wel

che

meh

rzei

lige

Aus

gabe

npr

oduz

iere

nun

dbe

isol

chen

,wel

che

inih

rer

Aus

gabe

auch

Lee

rzei

chen

enth

alte

nkö

n-ne

n.D

ada

sSt

anda

rdtr

ennz

eich

enei

nB

lank

istm

uss

man

,wen

nm

anni

cht

will

,das

sdi

eV

aria

ble

nur

bis

zum

Bla

nkge

füllt

wir

d,da

sSt

anda

rdtr

enn-

zeic

hen

verä

nder

n.FOR/F"delims="%%iIN('CD')DOset

verzeichnis=%%i

entf

ernt

jede

Art

von

Tren

nzei

chen

.B

eiB

efeh

len,

wel

che

meh

rzei

lige

Aus

gabe

nzu

rFol

geha

ben,

blei

btje

wei

lsdi

ele

tzte

Zei

lein

derV

aria

blen

erha

lten.

6.0.

8D

atei

enun

dVe

rzei

chni

sse

aufli

sten

Hie

ris

tei

nB

eisp

iel,

inde

mal

leD

atei

en,a

ufw

elch

edi

eFi

lterb

edin

gung

zutr

ifft,

aufg

elis

tetw

erde

n.A

usse

rdem

wer

den

die

Dat

eian

zahl

und

die

Dat

ei-

größ

enzu

sam

men

addi

ert.

Page 139: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

@echo

off

set

Filter=*.*

set

/A

DateiAnzahl=0

set

bytes=0

for

/R

%pfad%

%%f

in

(%Filter%)

do

(set

/A

DateiAnzahl

+=

1echo

%%f

-%%˜zfBytes

set

/A

bytes=bytes+%%˜zf

) echo.

echo

%˜dp0%Filter%

echo

Es

sind

%DateiAnzahl%

Dateien

vorhanden.

echo

Alle

Dateien

zusammen:

%bytes%Bytes

set

/A

kbytes=bytes/1024

echo

umgerechnet

sind

das

%kbytes%

KBytes

echo.

pause

Page 140: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6.0.

9Pa

use

Oft

ist

eshi

lfre

ich,

dass

ein

nach

dem

Bee

nden

des

Bat

ch-P

rogr

amm

sda

sE

inga

beau

ffor

deru

ngsf

enst

erof

fen

blei

bt.S

oka

nnm

anA

usga

ben

nach

lese

nod

erev

tl.au

fget

rete

neFe

hler

entd

ecke

n.N

unkö

nnte

man

einf

ach

amE

nde

eine

paus

eei

nfüg

en.D

abei

kann

derU

sere

infa

chda

sFe

nste

rsch

ließe

nod

erE

NT

ER

drüc

ken.

Man

kann

aber

auch

einf

ach

eine

zeitl

iche

Paus

em

itpi

ngre

alis

iere

n:

@echo

off

echo

Ich

schließe

gleich.

@ping

localhost

-n

2>NUL

Dab

eika

nnm

andi

eZ

eitm

itde

mPa

ram

eter

-nva

riie

ren.

Page 141: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bei

inst

allie

rtem

Res

ourc

eKit3

steh

tder

Bef

ehl"

slee

p"zu

rVer

fügu

ngw

elch

erdi

esel

beFu

nktio

nalit

ät(z

eitli

che

Paus

e)bi

etet

.

6.0.

10M

inim

iert

ausf

ühre

n

Hin

und

wie

deri

stes

sinn

voll,

dass

die

Bat

chda

teim

inim

iert

ausg

efüh

rtw

ird

(z.B

.ein

eLo

gin-

Bat

ch-D

atei

).Es

istm

öglic

h,da

ssm

andi

eB

atch

date

inor

mal

star

tetu

ndsi

esi

chse

lber

min

imie

rtau

sfüh

rt.D

erN

acht

eili

stal

lerd

ings

,das

ssi

chku

rzze

itig

ein

Ein

gabe

auff

orde

rung

s-Fe

nste

röff

net.

@echo

off

if

not

"%1"==""

goto

%1

3http://www.google.de/url?sa=t&source=web&ct=

res&cd=1&ved=0CAgQFjAA&url=http%3A%2F%2Fwww.

microsoft.com%2Fdownloads%2Fdetails.aspx%3FFamilyID%

3D9D467A69-57FF-4AE7-96EE-B18C4790CFFD&rct=j&q=ms+

resource+kit&ei=SEtGS8H6FYfM-Qai2tRt&usg=AFQjCNEUl30wzlC_

l61SaIBsG99a7Lccrg

Page 142: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

start

/MIN

cmd.exe

/C

"%˜nx0

begin"

goto:eof

:beginecho

Hallo,

ich

laufe

minimiert!

pause

goto:eof

Noc

hei

neK

onst

rukt

ion

ganz

ohne

Lab

els,

nach

dies

emN

ewsg

roup

-Bei

trag

4

@set

!=||(set

!=1&start

"%˜dpnx0"

/min

cmd

/c

%0

%*&set

!=&goto

:eof)

Anm

erku

ng:S

ollte

die

Com

man

d-Pr

oces

sor-

Opt

ion

"Del

ayed

Exp

ansi

on"

inde

rR

egis

try

aktiv

iert

sein

(sie

heun

ter

Hilf

e"c

md

/?")

,läs

stsi

chei

n"!

"al

sV

aria

blen

nam

eni

chtv

erw

ende

n.In

dies

emFa

ll-b

zw.s

innv

olle

rwei

seim

mer

-de

nV

aria

blen

nam

enän

dern

aufx

oder

yod

er#

oder

@...

.

4http://groups.google.co.uk/group/alt.msdos.batch.nt/msg/

d11e951a822bc420?dmode=source

Page 143: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bei

spie

l:

@set

#=||(set

#=1&start

"%˜dpnx0"

/min

cmd

/c

%0

%*&set

#=&goto

:eof)

6.0.

11M

ittel

ssta

rt/L

OW

die

Prio

ritä

tfes

tlege

n

Man

chm

alis

tes

hilf

reic

h,w

enn

die

Bat

chda

teim

itei

nern

iedr

igen

Prio

ritä

tlä

uft.

Das

kann

man

mitt

els

star

t/L

OW

erre

iche

n.W

eite

reO

ptio

nen

sind

NO

RM

AL

,HIG

H,R

EA

LTIM

E,A

BO

VE

NO

RM

AL

und

BE

LO

WN

OR

-M

AL

.Das

Bei

spie

lzei

gt,w

ieei

neB

atch

date

iqua

sisi

chse

lber

indi

eni

edrig

ePr

iori

tät

vers

etzt

enka

nn.I

nde

mFa

llkl

appt

esal

lerd

ings

nur,

wen

nbe

imer

sten

Star

tkei

nPa

ram

eter

über

gebe

nw

urde

.

@echo

off

if

"%1"==""

(start

/WAIT

/LOW

/B

cmd.exe

/V

/C

%˜s0

weiter_machen

goto:eof

)

Page 144: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

Jetzt

laufe

ich

mit

niedriger

Priorität!

echo

Überprüfe

es

im

Taskmanager!

pause

Funk

tions

wei

se:D

asPr

inzi

pis

teig

entli

chga

nzei

nfac

h.W

enn

kein

Para

me-

ter

über

gebe

nw

ird,

wir

dan

geno

mm

en,d

aßdi

eB

atch

date

izum

erst

enm

alge

star

tetw

urde

.Die

if"%

1"==

""B

edin

gung

ista

lso

erfü

llt.M

ittel

sst

art

wir

dda

nndi

esel

beB

atch

date

imit

verä

nder

ter

Prio

ritä

tges

tart

et,a

llerd

ings

mit

eine

man

gehä

ngte

nPa

ram

eter

wei

ter_

mac

hen

(Kön

nte

auch

irge

ndw

asan

dere

sse

in!)

Som

itis

tbei

mnä

chst

enA

ufru

fdie

if"%

1"==

""B

edin

gung

nich

tmeh

rerf

üllt

und

dern

orm

ale

Teil

derB

atch

date

iwir

dab

gear

beite

t.

Wen

nm

ande

rBat

chda

teie

inen

Para

met

erüb

erge

ben

möc

hte

(z.B

.ein

Dat

ei-

nam

eo.

ä.)m

uss

man

alle

Para

met

erve

rsch

iebe

n:

@echo

off

if

"%2"==""

(start

/WAIT

/LOW

/B

cmd.exe

/V

/C

%˜s0

%1

weiter_machen

goto:eof

)

Page 145: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

Jetzt

laufe

ich

mit

niedriger

Priorität!

echo

Nun

kann

[%1]

'bearbeitet'

werden...

pause

Anm

erku

ngen

:N

orm

aler

wei

sekö

nnte

man

stat

t%

˜s0

auch

"%˜0

"be

ide

rcm

d.ex

eZ

eile

verw

ende

n.A

llerd

ings

klap

ptda

sni

chtr

icht

ig,w

enn

Lee

rzei

-ch

enin

der

Bat

chD

atei

vorh

ande

nsi

nd.M

it%

˜s0

wir

dde

rko

mpl

ette

Pfad

zurB

atch

date

ials

"Kur

znam

en"

ange

gebe

n.In

dem

Pfad

kom

mtd

ann

kein

eL

eerz

eich

envo

r.

6.0.

12Pr

oble

me

mit

Vari

able

n

Wen

nm

ansi

chdi

eH

ilfes

eite

nzu

set

(mitt

els

set

/?)

durc

hlie

st,s

tößt

man

aufd

asT

hem

ave

rzög

erte

Erw

eite

rung

von

Vari

able

n.D

asw

illic

hhi

erm

alan

hand

von

Bei

spie

len

erkl

ären

:

Page 146: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Das

Prob

lem

set

test=1

if

"%test%"=="1"

(set

test=2

echo

Wert

von

'test'

im

IF-Block:

%test%

) echo

Wert

von

'test'

nach

IF-Block:

%test%

Man

sollt

em

eine

n,da

ssde

rWer

tvon

%te

st%

inbe

iden

Aus

gabe

n2

ist.

Doc

hle

ider

iste

sni

chts

o.D

enn

inne

rhal

bde

sIF

-Blo

cks

wir

dda

sN

euse

tzen

der

Varia

ble

test

von

1au

f2no

chni

chta

ktiv

und

som

itis

tdas

Erge

bnis

Wer

tvon

'test

'im

IF-B

lock

:1E

rstn

ach

dem

IF-B

lock

istd

erW

erta

ktua

lisie

rt:W

ert

von

'test

'nac

hIF

-Blo

ck:2

Page 147: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Lös

ung:

cmd.

exe

/V

Inei

nerB

atch

date

idie

mit

cmd

/Vge

star

tetw

urde

,wer

den

Var

iabl

enin

ner-

halb

von

Bef

ehls

blöc

ken

aktu

alis

iert

.Jed

och

kann

man

sie

nich

tgew

ohnt

mit

%te

st%

ansp

rech

en,s

onde

rnm

it!t

est!

@echo

off

if

"%1"==""

(start

/WAIT

/B

cmd.exe

/V

/C

"%˜0"

machen!

goto:eof

) set

test=1

if

"%test%"=="1"

(set

test=2

echo

Wert

von

'test'-Prozent

in

dem

IF-Block:

%test%

echo

Wert

von

'test'-Ausrufezeichen

in

dem

IF-Block:

!test!

) echo

Wert

von

'test'

nach

dem

IF-Block:

%test%

pause

Page 148: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6.0.

13A

usga

ben/

Fehl

erun

terd

rück

en

Man

chm

alm

öcht

em

anpe

rB

atch

ein

Prog

ram

mst

arte

nab

eres

soll

dabe

ike

ine

Aus

gabe

gem

acht

wer

den.

Das

istr

echt

einf

ach:

MeinProgramm.exe

>NUL

Es

könn

teab

erse

in,d

ass

evtl.

Fehl

erde

nnoc

hau

sgeg

eben

wer

den.

Das

liegt

dara

n,da

ßdi

ePr

ogra

mm

ein

dem

Fall

aufs

tder

rst

atts

tdou

tsch

reib

en.U

mau

chin

dem

Fall

die

Aus

gabe

zuun

terd

rück

en,k

ann

man

mit

eine

mzu

sätz

li-ch

en2>

&1

die

Aus

gabe

nvo

nst

derr

aufs

tdou

tum

leite

n.D

ast

dout

dann

nach

NU

Lve

rsch

oben

wir

d,si

ehtm

anab

solu

tnic

hts:

MeinProgramm.exe

>NUL

2>&1

Page 149: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6.0.

14Pr

ofes

sion

elle

Mes

sage

-Fen

ster

erze

ugen

Bis

herk

onnt

em

anin

Bat

chke

ine

Fens

tere

rzeu

gen,

bzw

.nur

inW

indo

ws

XP

mith

ilfe

des

Win

dow

sN

achr

icht

endi

enst

es.D

och

der

istf

ürA

nwen

dung

envi

elzu

unpr

aktis

ch,d

am

anni

chte

inm

alde

nFe

nste

rtite

lbes

timm

enka

nnun

dau

ßerd

emis

tdie

seru

nter

Vis

taod

erW

indo

ws

2000

nich

tver

fügb

ar.

Ich

habe

jedo

chei

nkl

eine

sSc

hlup

floch

gefu

nden

,mit

dem

man

denn

och

Fens

tere

rzeu

gen

kann

:

@echo

off

Echo

msgbox"Text",0,"Fenstername"

>Test.vbs

ping

localhost

-n

3-w

1000

>NUL

start

Test.vbs

pause

Erk

läru

ng:

Man

erze

ugt

hier

mith

ilfe

des

Um

leitu

ngss

ymbo

ls(E

ng.:

pipe

)>

eine

nTe

mpo

räre

nV

BSc

ript

,de

rin

der

Lag

eis

t,ei

nM

essa

gefe

nste

rzu

erze

ugen

.Die

sso

rgti

nA

nwen

dung

enfü

rmeh

rÜbe

rsic

htun

dPr

ofes

sion

alitä

t.

Page 150: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6.0.

15Fa

llsda

snic

htfu

nktio

nier

t

Falls

stat

teur

esTe

xtes

die

Mel

dung

:

"Der

Zug

riff

auf

den

Win

dow

sSc

ript

host

ist

auf

dies

emC

ompu

ter

deak

ti-vi

ert"

...er

sche

int,

dann

istd

asÖ

ffne

nvo

nV

Bsc

ript

sun

dJS

crip

tsau

sSi

cher

-he

itsgr

ünde

nve

rbot

en.

Um

das

zuän

dern

,öff

neti

hrde

nW

indo

ws

Reg

istr

ieru

ngse

dito

r(re

gedi

t.exe

)un

dlö

scht

NU

Rfo

lgen

den

Wer

t:

HK

ey_L

ocal

_Mac

hine

\Sof

twar

e\M

icro

soft

\Win

dow

sScr

iptH

ost\E

nabl

ed

dann

dürf

tees

funk

tioni

eren

.Ers

tellt

vor

der

Änd

erun

gei

neSi

cher

heits

ko-

pie

eure

rW

erte

!!!

Page 151: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6.0.

16St

atus

über

bear

beite

teZ

eile

nau

sgeb

en

Häu

figbe

arbe

itetm

anei

neLi

ste

von

Obj

ekte

nm

itei

nerF

OR

-Sch

leife

.Dam

itm

anda

rübe

rinf

orm

iert

istw

iew

eitd

ieB

earb

eitu

ngbe

reits

fort

gesc

hritt

enis

t,ka

nnm

andi

eA

nzah

lder

Bea

rbei

tete

nO

bjek

teim

titel

derD

OS-

Box

ausg

eben

lass

en.

Schr

itt1

-Erm

ittel

n/z

ähle

nde

rzu

bear

beite

nden

Zei

len:

dies

geht

ambe

sten

mit

folg

ende

rFO

R-S

chle

ife:

FOR

/F

"eol=#

tokens=1,2,3

"%A

IN

('find

/c

";"liste.txt')

DO

echo

%C

Zeilen

Wob

eida

s";

"ei

nZ

eich

ense

inm

uss

das

inje

der

zuve

rarb

eite

nden

Zei

levo

rkom

mt.

Die

sis

tam

schn

ells

ten.

Will

man

wir

klic

hje

deZ

eile

zähl

enun

abhä

ngig

vom

Inha

lt,da

nnka

nnm

anau

chfo

lgen

den

Bef

ehlv

erw

ende

n:

Page 152: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

FOR

/F

"delims=:"

%%A

IN

('findstr

/N

.*"liste.txt"')

DO

echo

%%A

Zeilen

Jetz

tbed

arfe

sno

chde

sSE

T-B

efeh

lzum

Ber

echn

ende

rakt

uelle

nZ

eile

und

setL

ocal

Ena

bleD

elay

edE

xpan

sion

,dan

nkö

nnte

das

Scri

ptfo

lgen

derm

aßen

auss

ehen

:

@echo

off

setLocal

EnableDelayedExpansion

set

COUNT=0

set

COUNTMAX=0

FOR

/F

"eol=#

tokens=1,2,3

"%%A

IN

('find

/c

";"liste.txt')

DO

set

COUNTMAX=%%C

for

/f

"eol=#

tokens=1

delims=;"

%%j

in

(liste.txt)

do

(set

/A

COUNT

+=1

title

%0

-!COUNT!

Zeilen

von

!COUNTMAX!

bearbeitet

echo

Tue

etwas

mit

dem

Token

%%j

REM

der

ping

wird

nur

zur

Verzögerung

ausgeführt

damit

man

der

Page 153: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Titel

Zeile

besser

verfolgen

kann.

ping

-n

1localhost

>NUL

)

Page 154: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

7N

etzw

erku

mge

bung

7.1

ping

Kan

nve

rwen

detw

erde

n,um

die

Ver

bind

ung

zuei

nem

ande

ren

Rec

hner

zute

sten

.Wen

ndi

eG

egen

seite

antw

orte

t,w

erde

nIn

form

atio

nen

über

die

IP-

Num

mer

und

zurV

erbi

ndun

gsqu

alitä

tang

ezei

gt.Z

ube

acht

enis

tdab

ei,d

ass

aus

eine

rau

sble

iben

den

Ant

wor

tni

cht

zwan

gslä

ufig

auf

eine

nm

issg

lück

-te

nV

erbi

ndun

gsve

rsuc

hge

schl

osse

nw

erde

nda

rf:m

anch

eA

dmin

istr

ator

enun

terb

inde

ndi

ese

Art

Test

aus

Sich

erhe

itsgr

ünde

n.

147

Page 155: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bei

spie

l

C:\>ping

de.wikibooks.org

Aus

gabe

Ping

rr.knams.wikimedia.org

[145.97.39.155]

mit

32

Bytes

Daten:

Antwort

von

145.97.39.155:

Bytes=32

Zeit=67ms

TTL=57

Antwort

von

145.97.39.155:

Bytes=32

Zeit=35ms

TTL=57

Antwort

von

145.97.39.155:

Bytes=32

Zeit=34ms

TTL=57

Antwort

von

145.97.39.155:

Bytes=32

Zeit=39ms

TTL=57

Ping-Statistik

für

145.97.39.155:

Pakete:

Gesendet

=4,

Empfangen

=4,

Verloren

=0

(0%

Verlust),

Ca.

Zeitangaben

in

Millisek.:

Minimum

=34ms,

Maximum

=67ms,

Mittelwert

=43ms

C:\>

Page 156: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Hin

wei

s

Die

slä

ssts

ich

durc

hei

nen

Tric

km

itde

mfin

dB

efeh

lauc

hau

tom

atis

iere

n:

ping

de.wikibooks.org

|find

"TTL"

||

goto

hostnotfound

7.2

ipco

nfig

•D

urch

den

Para

met

er/h

elp

erhä

ltm

anku

rze

Hilf

e.•

Der

Auf

rufd

esB

efeh

lsip

confi

goh

nePa

ram

eter

teilt

die

eige

neIP

-Adr

esse

mit.

•D

urch

den

Bef

ehli

pcon

figlä

ssts

ich

die

IP-A

dres

sevo

nN

etzw

erkv

erbi

n-du

ngen

(Eth

erne

tkar

ten)

verw

alte

n.

Bei

spie

l

Page 157: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

C:\>ipconfig

Aus

gabe

Windows-IP-Konfiguration

Ethernetadapter

VMware

Network

Adapter

VMnet8:

Verbindungsspezifisches

DNS-Suffix:

IP-Adresse.

..

..

..

..

..

.:

192.168.0.1

Subnetzmaske.

..

..

..

..

..

:255.255.255.0

Standardgateway

..

..

..

..

.:

192.168.0.11

Ethernetadapter

VMware

Network

Adapter

VMnet1:

Verbindungsspezifisches

DNS-Suffix:

IP-Adresse.

..

..

..

..

..

.:

192.168.2.1

Subnetzmaske.

..

..

..

..

..

:255.255.255.0

Standardgateway

..

..

..

..

.:

192.168.2.11

Ethernetadapter

LAN-Verbindung

3:

Page 158: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Verbindungsspezifisches

DNS-Suffix:

myhost.local

IP-Adresse.

..

..

..

..

..

.:

192.168.1.1

Subnetzmaske.

..

..

..

..

..

:255.255.255.0

Standardgateway

..

..

..

..

.:

192.168.1.11

C:\>

7.2.

1ip

confi

g/a

ll

Ein

ede

taill

iert

ere

Aus

kunf

terh

ältm

anm

itde

mPa

ram

eter

/all

Bei

spie

l

C:\>ipconfig

/all

Aus

gabe

Page 159: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Windows-IP-Konfiguration

Hostname.

..

..

..

..

..

..

:cestmoi

Primäres

DNS-Suffix

..

..

..

.:

mypc.local

Knotentyp

..

..

..

..

..

..

:Unbekannt

IP-Routing

aktiviert.

..

..

..

:Nein

WINS-Proxy

aktiviert.

..

..

..

:Nein

DNS-Suffixsuchliste

..

..

..

.:

mypc.local

mypc.local

Ethernetadapter

VMware

Network

Adapter

VMnet8:

Verbindungsspezifisches

DNS-Suffix:

Beschreibung.

..

..

..

..

..

:VMware

Virtual

Ethernet

Adapter

for

VMnet8

Physikalische

Adresse

..

..

..

:01-23-45-67-89-AB

DHCP

aktiviert.

..

..

..

..

.:

Nein

IP-Adresse.

..

..

..

..

..

.:

192.168.0.1

[...

]

Page 160: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

7.2.

2ip

confi

g/r

enew

Sollt

endi

eN

etzw

erkk

onfig

urat

ione

nni

chtm

ehra

ufzu

finde

nse

in,d

ann

hilf

tof

tder

Para

met

er/r

enew

Bei

spie

l

C:\>

ipconfig

/renew

7.2.

3ip

confi

g/fl

ushd

ns

Situ

atio

n

Ein

eH

omep

age

wir

dni

chta

ngez

eigt

,sta

ttdes

sen

wir

dei

neFe

hler

mel

dung

ange

zeig

t,w

iez.

B."

Die

Web

site

könn

tevo

rübe

rgeh

end

nich

terr

eich

bar

sein

,ve

rsuc

hen

Sie

esbi

ttesp

äter

noch

mal

s."

Page 161: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Als

Test

wir

dde

rSer

vera

ngep

ingt

,und

esko

mm

tein

eFe

hler

mel

dung

Zeitüberschreitung

der

Anforderung.

Der

Adm

inis

trat

orkü

mm

ert

sich

umda

sPr

oble

mun

dsa

gt,d

erSe

rver

sei

wie

der

OK

,ab

erno

chim

mer

kom

men

Fehl

erm

eldu

ngen

und

Hom

epag

eskö

nnen

nich

tan

geze

igt

wer

den.

Dan

nka

nnes

dara

nlie

gen,

dass

der

DN

S-C

ache

noch

die

Fehl

mel

dung

gesp

eich

erth

at,u

nddi

eser

mus

sge

leer

tw

erde

n.A

nste

llede

nR

echn

erne

uzu

star

ten

gibt

man

folg

ende

sei

n

C:\>ipconfig

/flushdns

Windows-IP-Konfiguration

Der

DNS-Auflösungscache

wurde

geleert.

C:\>

Page 162: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

7.3

trac

ert

Mit

trac

ertk

ann

man

die

Rou

tevo

mei

gene

nPC

zur

Zie

ladr

esse

verf

olge

n,un

dev

tl.R

ücks

chlü

sse

zieh

en,o

bun

dw

arum

eine

Ver

bind

ung

häng

t.

Bei

spie

l

C:\>tracert

de.wikibooks.org

Aus

gabe

Routenverfolgung

zu

rr.knams.wikimedia.org

[145.97.39.155]

über

maximal

30

Abschnitte:

1<1

ms

<1

ms

<1

ms

123.456.789.1

224

ms

18

ms

19

ms

adslgw01-fra4.rm-com.net

[217.173.128.45]

3139

ms

35

ms

36

ms

bbcr01-ams.titannetworks.nl

[217.173.143.17]

Page 163: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

440

ms

*43

ms

xsr03.asd002a.surf.net

[195.69.144.34]

541

ms

34

ms

35

ms

AZ-500.XSR01.Amsterdam1A.surf.net

[145.145.80.21]

639

ms

38

ms

37

ms

KNCSW001-router.Customer.surf.net

[145.145.18.158]

741

ms

43

ms

37

ms

gi0-24.csw2-knams.wikimedia.org

[145.97.32.29]

838

ms

38

ms

36

ms

rr.knams.wikimedia.org

[145.97.39.155]

Ablaufverfolgung

beendet.

C:\>

7.4

nets

tat

Die

serB

efeh

lzei

gtal

leof

fene

nTC

P/IP

/ICM

P/U

DP

(usw

...)V

erbi

ndun

gen

an.

Page 164: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

netstat

Mit

der

Erw

eite

rung

-pPr

otok

oll

lass

ensi

chau

chnu

rV

erbi

ndun

gen

zum

Ent

spre

chen

den

Prot

okol

laus

lese

n(m

eist

TC

P):

netstat

-p

TCP

7.5

NE

T

NET

iste

inTo

olzu

rÜbe

rwac

hung

und

Man

ipul

atio

nvo

nN

etzw

erka

ktiv

itäte

nso

wie

Win

dow

s-D

iens

ten.

Es

hate

inen

rech

tgro

ßen

Funk

tions

umfa

ng,v

onde

mic

hhi

erje

doch

nure

inig

eku

rzvo

rste

lle.

Page 165: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

7.5.

1N

ET

USE

-Net

zlau

fwer

keve

rbin

den

NET

USE

kann

genu

tztw

erde

num

eine

Verb

indu

ngzu

Net

zwer

k-od

erSa

mba

-Fr

eiga

ben

herz

uste

llen.

Übl

iche

rwei

sew

ird

hier

beie

inL

aufw

erks

buch

stab

eve

rwen

det,

dies

istj

edoc

hni

chtz

win

gend

.

Synt

ax:

NET

USE

x:

\\name.oder.ip.des.rechners\freigabe

Wen

nfü

rdi

eV

erbi

ndun

gdi

eE

inga

bevo

nZ

ugan

gsda

ten

erfo

rder

lich

ist

könn

endi

ese

auch

mit

ange

gebe

nw

erde

n:

NET

USE

x:

/USER:benutzer

\\name.oder.ip.des.rechners\freigabe

"passwort"

Page 166: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Wen

nfü

rein

enR

echn

erZ

ugan

gsda

ten

benö

tigtw

erde

nun

ddi

ese

nich

tode

rfa

lsch

ange

gebe

nw

urde

n,so

wir

dde

rBen

utze

rnac

hdi

esen

gefr

agt.

Es

kann

auch

nur

ein

Ben

utze

ran

gege

ben

wer

den

inde

mda

sPa

ssw

ortd

urch

eine

nA

ster

isk

(*)e

rset

ztw

ird.

Die

Ein

gabe

von

NE

TU

SEoh

nePa

ram

eter

zeig

tber

eits

verb

unde

neL

auf-

wer

kean

.Bei

Win

dow

s-Fr

eiga

ben

wir

dau

chei

nSt

atus

ange

zeig

t,be

iSam

ba-

Frei

gabe

nje

doch

nich

t.

7.5.

2N

ET

SEN

D-N

achr

icht

enan

ande

reR

echn

erse

nden

Mit

NE

TSE

ND

könn

enku

rze

Nac

hric

hten

anan

dere

Rec

hner

gesc

hick

tw

erde

n.D

erE

mpf

änge

rsi

eht

dies

eda

nnno

rmal

erw

eise

inei

ner

Mes

sage

-B

ox.D

ieB

enut

zung

empfi

ehlt

sich

nurb

edin

gt,d

am

oder

neFi

rew

alls

solc

heN

achr

icht

enno

rmal

erw

eise

bloc

ken

(sie

heH

inw

eis

unte

n).

Synt

ax:

Page 167: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

NET

SEND

Empfänger

Nachricht

Em

pfän

gerk

ann

dabe

isei

n:

•IP

-Adr

esse

•D

omai

n•

Dom

ain

mit

Ben

utze

rang

abe

(/do

mai

n:na

me)

•R

echn

erna

me

imlo

kale

nN

etzw

erk

•B

enut

zern

ame

imlo

kale

nN

etzw

erk

•A

ster

isk

füra

lleer

reic

hbar

en(l

okal

en)R

echn

er

Hin

wei

s:D

aN

ET

SEN

Dle

ider

sehr

oft

für

Spam

mis

sbra

ucht

wir

d/w

urde

empfi

ehlt

essi

ches

abzu

scha

lten.

Die

sge

schi

ehtü

ber

den

Win

dow

s-Se

rvic

e"N

achr

icht

endi

enst

".D

adur

chkö

nnen

wed

erN

achr

icht

enge

send

etno

chem

p-fa

ngen

wer

den.

(NE

TST

OP

Mes

seng

er)

Page 168: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

7.5.

3N

ET

STA

RT

Star

tetW

indo

ws-

Die

nste

Synt

ax:

NET

START

Dienstname

(Entweder

"Messenger"

oder

"Nachrichtendienst",

je

nach

Regions-

/Spracheinstellungen)

Die

Ein

gabe

von

NE

TST

AR

Toh

nePa

ram

eter

zeig

tdie

aktu

ellg

esta

rtet

enW

indo

ws-

Die

nste

an.

7.5.

4N

ET

STO

P

Stop

ptW

indo

ws-

Die

nste

Gle

iche

Synt

axw

ieN

ET

STA

RT

Page 169: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

7.5.

5N

ET

VIE

W

Zei

gter

reic

hbar

eC

ompu

terd

eslo

kale

nN

etzw

erks

,bzw

.der

enFr

eiga

ben

an.

Synt

ax:

NET

VIEW

[\\computername]

Einf

ache

Eing

abe

von

NET

VIE

Wze

igta

lleC

ompu

tera

n,w

enn

ein

Com

pute

r-na

me

mit

ange

gebe

nw

ird

wer

den

die

Frei

gabe

nan

geze

igt.

Die

sfu

nktio

nier

tnu

rbe

iW

indo

ws-

Rec

hner

n.U

NIX

-Rec

hner

mit

Sam

ba-F

reig

aben

wer

den

zwar

inde

bers

icht

ange

zeig

t,di

eFr

eiga

ben

könn

enab

erni

chta

bgef

ragt

wer

den.

Page 170: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

7.5.

6N

ET

USE

R

Mit

dies

emB

efeh

lkön

nen

Ben

utze

rkon

ten

verw

alte

twer

den.

Daz

usi

ndA

d-m

inis

trat

orre

chte

erfo

rder

lich.

Synt

ax:

NET

USER

Die

serB

efeh

lalle

inze

igtn

ural

leB

enut

zerd

esR

echn

ers

an.(

2000

)(X

P)

Net

User

<name>

Dur

chdi

esen

Bef

ehlw

ird

die

Ein

stel

lung

des

Ben

utze

rkon

tos

des

Ben

utze

rs<n

ame>

ange

zeig

t.(2

000)

(XP)

Page 171: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Net

User

<name>

<passwort>

/add

Die

serB

efeh

lfüg

tein

enB

enut

zerh

inzu

.(20

00)(

XP)

Net

User

<name>

/delete

Und

dies

erB

efeh

lwie

deru

mlö

scht

eine

nB

enut

zer.

(200

0)(X

P)

Net

User

<name>

<passwort>

Die

ser

Bef

ehl

verä

nder

tda

sPa

ssw

ort

des

Ben

utze

rs.

Wen

nan

stat

tde

spa

ssw

orts

ein

Ster

n*

ange

gebe

nw

ird,d

ann

wird

das

neue

Pass

wor

tabg

efra

gt.

(200

0)(X

P)

Page 172: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Net

User

<name>

/expires:never

Dam

itw

ird

eing

este

llt,d

ass

dass

Pass

wor

tdes

Ben

utze

rs<n

ame>

niem

als

ablä

uft.

(200

0)(X

P)

Net

User

<name>

/active:Yes

Net

User

<name>

/active:No

Dam

itw

irdda

sen

tspr

eche

nde

Ben

utze

rkon

toak

tivie

rtod

erde

aktiv

iert.

(200

0)(X

P) Net

User

<name>

/passwordchg:Yes

Net

User

<name>

/passwordchg:No

Dam

itw

ird

eing

este

llt,o

bde

rBen

utze

rsei

nei

gene

sPa

ssw

ortv

erän

dern

darf

.(2

000)

(XP)

Page 173: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Net

User

<name>

/comment:"Herr

Maier

vom

Verkauf"

Dam

itw

ird

derB

enut

zerk

omm

enta

rver

ände

rt.(

2000

)(X

P)

Net

User

<name>

/Fullname:"Karl-Otto

Maier-Müller"

Dam

itw

ird

derk

ompl

ette

Ben

utze

rnam

eve

ränd

ert.

(200

0)(X

P)

Net

User

<name>

/expires:2009-12-31

Dam

itw

irdei

neZe

itvo

rgeg

eben

,nac

hde

rder

Ben

utze

rsei

nPa

ssw

ord

ände

rnm

uss.

(200

0)(X

P)

Net

User

<name>

/profilepath="D:\Maier"

Net

User

<name>

/scriptpath="D:\Maier"

Page 174: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Net

User

<name>

/homedir="D:\Maier"

Net

User

<name>

/homedirreq=Yes

Net

User

<name>

/homedirreq=No

Dam

itw

ird

eing

este

llt,

wo

sich

die

Ben

utze

rdat

enbe

finde

n.D

erO

rtde

rB

enut

zerd

aten

wir

din

derU

mge

bung

svar

iabl

eU

SER

PRO

FIL

Ege

spei

cher

t.(2

000)

(XP)

Net

User

<name>

/countrycode=049

Dam

itw

ird

die

Län

dere

inst

ellu

ngve

ränd

ert.

(200

0)(X

P)

Net

User

<name>

/workstations:*

Dam

itw

irdes

dem

Ben

utze

rerla

ubt,

sich

von

ande

ren

Rec

hner

nau

san

dies

emR

echn

eran

zum

elde

n.A

nsta

tt*

kann

hier

auch

eine

List

evo

nC

ompu

tern

amen

Page 175: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

ange

gebe

nw

erde

n.D

ann

darf

sich

der

Ben

utze

rnu

rvo

ndi

esen

Com

pute

rnan

mel

den.

(200

0)(X

P)

Hin

wei

s:D

iese

Arb

eits

vorg

änge

gehe

nau

chm

itde

rW

indo

ws

Ben

utze

r-ko

nten

steu

erun

g.D

iese

kann

erre

icht

wer

den

durc

h[S

tart

][E

inst

ellu

ngen

][S

yste

mst

euer

ung]

[Ben

utze

r]

Hin

wei

s:D

erN

ame

des

aktu

ella

ngem

elde

ten

Ben

utze

rsis

tin

des

Um

gebu

ngs-

vari

able

Use

rNam

e.

Hin

wei

s:H

ilfe

zum

Bef

ehlN

etU

ser

erhä

ltm

andu

rch

Ein

gabe

von

Net

Use

r/h

elp

Bei

spie

l:U

mde

nB

enut

zerO

ttom

itde

mPa

ssw

ord

Frie

daei

nzur

icht

en,k

ann

folg

ende

Bat

ch-D

atei

ausg

efüh

rtw

erde

n:

net

user

Otto

Frieda

/add

net

user

Otto

/expires:never

net

user

Otto

/comment:"Default

USER

from

This

Computer"

Page 176: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

net

user

Otto

/active:Yes

net

user

Otto

Page 177: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 178: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

8B

eisp

iele

8.0.

7R

eged

it.ex

e

Ein

ekl

eine

Bat

chda

tei,

umm

itre

gedi

t.exe

dire

ktei

nen

best

imm

ten

RE

G-

Zw

eig

anzu

spri

ngen

:

set

LastKey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows

NT\CurrentVersion\Hotfix"

set

Key=HKEY_C

URRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit

reg

add

%Key%

/f

/v

"LastKey"

/d

%LastKey%

start

regedit.exe

171

Page 179: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Erl

äute

rung

:

•L

astK

eyis

tder

Reg

-Sch

lüss

el,d

eral

sL

etzt

esan

geze

igtw

urde

und

dies

erw

irdbe

imSt

artv

onre

gedi

tdire

ktan

gesp

rung

en,d

iese

nSc

hlüs

selk

ann

man

nach

Bel

iebe

nan

pass

en.

•K

eyis

tder

Reg

-Sch

lüss

elin

dem

sich

derW

ert"

Las

tKey

"be

finde

t.

Las

tKey

wir

dm

ittel

sre

gad

din

die

Reg

istr

yei

nges

piel

tund

dana

chw

ird

rege

ditg

esta

rtet.

Das

Gan

zefu

nktio

nier

talle

rdin

gsnu

r,w

enn

rege

dit.e

xeno

chni

chtl

äuft

.

Und

hier

noch

eine

klei

neB

atch

date

i,um

mit

rege

dit.e

xeW

erte

aus

derR

egis

-tr

yau

szul

esen

:

set

Key="HKEY_CU

RRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit"

regedit.exe

/e

c:\temp\inhalt.reg

%Key%

Ach

tung

!D

ieD

atei

inha

lt.re

gis

tim

Uni

code

-For

mat

.Ein

Tipp

dazu

:D

erty

pe-B

efeh

lkan

nU

nico

dele

sen.

Page 180: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

8.0.

8Ta

skL

ist-

Abf

rage

Ein

eR

outin

eum

das

Lau

fen

eine

sPr

ozes

ses

mitt

els

task

list.e

xefe

stzu

stel

len.

Indi

esem

Bei

spie

lwir

dge

prüf

t,ob

Proz

ess.e

xelä

uft.

@echo

off

set

ProgEXE=Prozess.exe

set

tempdatei=%temp%\TempDatei.txt

tasklist

/FI

"IMAGENAME

eq

%ProgEXE%"

/FO

CSV>%tempdatei%

for

/F

"skip=2

tokens=1

delims=,"

%%f

in

(%tempdatei%)

do

(echo

gefiltert:

[%%f]

if

"%%f"==""%ProgEXE%""

echo

Prozess

%ProgEXE%

läuft

goto

ende

) echo

Prozess

%ProgEXE%

läuft

nicht!

goto

ende

:ende

del

%tempdatei%

Page 181: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Alte

rnat

iv,o

hne

obig

ete

mpo

räre

Dat

ei'te

mpd

atei

'zu

benö

tigen

,kan

nm

anbe

ispi

elsw

eise

unte

rWin

dow

sX

Pfo

lgen

des

verw

ende

n:

TaskList

/FI

"IMAGENAME

eq

%ProgEXE%"

2>NUL

|Find

"%ProgEXE%"

>NUL

IF

ERRORLEVEL

==

1(

ECHO

NOT

Running.

GOTO

Ende

)ELSE

(ECHO

Running.

GOTO

Ende

)

8.0.

9D

iens

teei

nric

hten

@echo

off

prompt

-$G

echo.

echo

###

Manuelle

Dienste

###

echo.

call:M

helpsvc

"Hilfe

und

Support"

Page 182: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

call:M

ImapiService

"IMAPI-CD-Brenn-COM-Dienste"

echo.

echo

###

nicht

benötigte

Dienste

Deaktivieren

###

echo.

call:D

cisvc

"Indexdienst"

call:D

ERSvc

"Fehlerberichterstattungsdienst"

echo.

echo

###

Automatische

Dienste

###

echo.

call:A

CryptSvc

"Kryptografiedienste

call:A

MSIServer

"Windows

Installer"

echo.

echo.

echo

Fertig!

echo.

pause

goto:eof

:A

Page 183: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

%2

auf

Automatisch

set

Parameter=auto

net

start

%1

goto

machen

:Mecho

%2

auf

Manuell

set

Parameter=demand

net

stop

%1

goto

machen

:Decho

%2

auf

Deaktiviert

set

Parameter=disabled

net

stop

%1

goto

machen

rem

Systemstart

Gerätetreiber,

der

vom

Startladeprogramm

geladen

wird.

rem

system

Gerätetreiber

start

während

der

Kernelinitialisierung.

rem

auto

automatischer

start,

nach

systemstart,

vor

Benutzeranmeldung.

rem

demand

Dienst,

der

manuell

gestartet

werden

muss.

Page 184: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

rem

disabled

Dienst

deaktivieren

:machen

echo

on

sc

config

%1

start=

%Parameter%

@echo

off

echo.

echo.

goto:eof

8.0.

10W

indo

wsX

PSP

2:in

stal

liert

ePa

tche

s/U

pdat

esau

flist

en

Zei

gtun

ter

Win

dow

sX

Pm

itSe

rvic

ePa

ck2

alle

zusä

tzlic

hin

stal

liert

enPa

tche

s/U

pdat

esan

.

@echo

off

set

RegHotfixListe=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows

NT\CurrentVersion\Hotfix

Page 185: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

set

RegHotfixInfo=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows

XP\SP3

for

/F

"delims=\

tokens=7"

%%f

in

('reg

query

"%RegHotfixListe%"')

do

(set

HotFixNr=%%f

CALL

:Anzeigen

) echo.

echo.

pause

goto:eof

:Anzeigen

reg

query

"%RegHotfixListe%\%HotFixNr%"

/v

Installed

|FIND

"0x1">NUL

if

"%errorlevel%"=="0"

(set

installiert=ja

call:KB_Info

)ELSE

(

Page 186: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

set

installiert=nein

)

echo

%HotFixNr%

-Ist

Installiert:

%installiert%

if

not

"%InstalledBy%"==""

echo

%HotFixNr%

installiert

von

%InstalledBy%

if

not

"%InstalledDate%"==""

echo

%HotFixNr%

am

%InstalledDate%

echo.

goto:eof

:KB_Info

set

InstalledBy=

for

/F

"tokens=3"

%%c

in

('reg

query

"%RegHotfixInfo%\%HotFixNr%"

/v

InstalledBy

2^>NUL

^|

FIND

"InstalledBy"')

do

(set

InstalledBy=%%c

)set

InstalledDate=

for

/F

"tokens=3"

%%c

in

('reg

query

"%RegHotfixInfo%\%HotFixNr%"

/v

InstalledDate

2^>NUL

^|

FIND

"InstalledDate"')

do

(set

InstalledDate=%%c

Page 187: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

)goto:eof

8.0.

11Pr

intd

atei

endi

rekt

ande

nD

ruck

erse

nden

Send

etei

nzel

neD

ruck

date

ien

anim

Net

zwer

kfr

eige

gebe

neD

ruck

er.E

igne

tsi

chbe

sond

ers

beiS

tand

ard

Dru

cksp

rach

enw

iePo

stsc

ript

und

HPG

L/2

.

@echo

off

rem

"pl.bat"

sendet

einzelne

Druckdateien

an

bel.

Drucker

direkt.

rem

eignet

sich

besonders

bei

Standard

Drucksprachen

wie

Postscript

und

HPGL/2.

rem

Laesst

sich

in

Windows

bequem

einbinden,

z.B

rechte

Maustaste

-Senden

an

Plotter

:voreingestellt

set

server=192.168.0.5

rem

server

---

IP

von

Printserver/oder

Name

von

Freigaberechner

---set

druckerbeschreibung=192.168.0.5

Freigabename

EPSON

rem

druckerbeschreibung

---

damit

der

Drucker

leichter

Page 188: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

identifiziert

werden

kann

---

set

drucker=EPSONNT

rem

drucker

---

das

muss

der

Freigabename

im

Netzwerk/auf

dem

Freigaberechner

sein

---

if

'%1'

==

'drucker01'

goto

drucker01

if

'%1'

==

'drucker02'

goto

drucker02

if

'%1'

==

'canon'

goto

canon

goto

datei

:drucker01

shift

goto

datei

:drucker02

set

server=42.1.1.240

set

druckerbeschreibung=HP

DJ

755CM

im

Sekretariat

set

drucker=hpdj755-tcp

shift

goto

datei

:canonset

server=192.168.0.1

set

druckerbeschreibung=Canon

s/w

Laser

im

EG

set

drucker=CanonLBP

Page 189: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

shift

goto

datei

:dateiif

'%~1'

==

''

goto

aufruf

goto

plot

:plot echo.

echo

Dateiname

:%1

echo

Druckserver

:%server%

echo

Freigabename:

%drucker%

echo

Beschreibung:

%druckerbeschreibung%

echo.

print

/d:\\%server%\%drucker%

'%~1'

goto:eof

:aufruf

echo.

echo

aufruf

:pl

[plotter]

Datei

echo

plotter

:drucker01,

drucker02,

canon,

(voreingestellt

ist

drucker01)

echo.

Anm

erku

ngzu

rNut

zung

dies

esSc

ript

es:

Page 190: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

•D

erPr

intb

efeh

lsch

ickt

die

Dat

eiO

HN

EIn

terp

reta

tion

dire

ktan

den

Dru

cker

.E

ine

Bild

date

iim

JPE

G-F

orm

atw

ürde

stat

tder

Gra

fikal

sole

digl

ich

eine

nha

ufen

wir

rerZ

eich

ener

gebe

n.•

Der

Dru

cker

mus

sin

der

Lag

ese

in,s

elbs

tASC

II-Z

eich

enzu

vera

rbei

ten

und

aus

zuge

ben.

Die

sis

tbei

älte

ren

Dru

cker

n(v

orca

.199

6si

cher

)im

mer

der

Fall.

Heu

tebe

herr

sche

nm

eist

nur

noch

Post

Scri

pt-f

ähig

eD

ruck

erdi

ese

Fähi

gkei

t."B

illig

en"

GD

I-D

ruck

ern

mus

sm

anet

was

aufd

ieSp

rüng

ehe

lfen

mit

dem

verw

ende

ten

"Dru

ckpr

ozes

sor"

imW

indo

ws-

Dru

cker

treib

er.

•Z

umU

msc

halte

nzu

näch

stdi

eD

ruck

erüb

ersi

chtö

ffne

n-

Zu

finde

nun

ter

Star

t|Dru

cker

und

Faxg

erät

e•

Dan

ndi

eE

igen

scha

ften

des

gew

ünsc

hten

Dru

cker

sau

sruf

en(R

echt

sklic

k|E

igen

scha

ften

)•

Auf

dem

Rei

ter"

Erw

eite

rt"

den

But

ton

"Dru

ckpr

ozes

sor..

."kl

icke

n•

Inde

mer

sche

inen

den

Dia

logf

eld

gibt

es2

Feld

erm

itE

intr

ägen

.Im

rech

ten

Feld

(Sta

ndar

tdat

enty

pen)

finde

tsic

hne

ben

vers

chie

dene

nan

dere

nau

chde

r

Page 191: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Ein

trag

"Tex

t".D

iese

nm

arki

eren

und

dann

alle

sm

itO

Kw

iede

rsch

ließe

n.

Der

Dru

ckpr

ozes

sorv

onW

indo

ws

istn

unin

derL

age,

Aus

gabe

nen

tspr

eche

ndzu

Inte

rpre

tiere

nun

dde

mG

DI-

Dru

cker

als

Gra

fikzu

liefe

rn.E

skö

nnen

aber

nur

stur

80Z

eich

en(m

axim

al)

auf

ca.6

0Z

eile

nve

rtei

lwer

den.

Man

chm

alsi

ndes

bis

zu66

Zei

len.

8.0.

12C

opy

Kop

iere

nvo

nD

atei

en.

Der

Bef

ehl

copy

test.txt

c:\temp

Page 192: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

kopi

ertd

ieD

atei

test

.txta

usde

mak

tuel

len

Ord

neri

nde

nO

rdne

rc:\

tem

p.D

erB

efeh

l

copy

c:\test.txt

c:\temp

kopi

ertd

ieD

atei

test

.txta

usde

mO

rdne

rc:\

inde

nO

rdne

rc:\

tem

p

Dat

ei-

und

Pfad

nam

enm

itSo

nder

zeic

hen

(hi

erda

sL

eerz

eich

enso

wie

()[]

{}ˆ=

;!'+

,‘˜)

müs

sen

beim

Cop

y=K

omm

ando

und

den

mei

sten

ande

ren

Kom

man

dos

indo

ppel

ten

Anf

ühru

ngsz

eich

en("

)ang

egeb

enen

wer

den,

zum

Bei

spie

l:

copy

f:\Beispiel.cmd

"c:\Dokumente

und

Einstellungen\Siegfried\Eigene

Dateien\"

Wie

man

sieh

t,ka

nnm

anbe

ide

Schr

eibw

eise

nm

isch

en.D

ageg

enkö

nnen

sich

meh

rfac

hvo

rhan

dene

Anf

ühru

ngsz

eich

enw

iede

rauf

hebe

n.D

esha

lbm

üsse

n

Page 193: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

vom

Ben

utze

ran

gege

bene

Anf

ühru

ngsz

eich

ener

sten

tfer

ntw

erde

n,be

vor

man

inde

reig

enen

Bat

chda

tein

eue

setz

t:

@echo

off

echo

Kopiert

eine

Datei

in

das

eigene

Benutzerprofil.

rem

Die

Anführungszeichen

in

der

folgenden

Zeile

werden

nur

benötigt,

rem

damit

zwischen

dem

Doppelpunkt

und

der

Eingabe

ein

Abstand

entsteht.

set

/p

name="Bitte

geben

Sie

einen

Dateinamen

an:

"rem

In

der

folgenden

Zeile

werden

alle

Anführungszeichen

entfernt,

da

rem

nach

dem

Gleichheitszeichen

kein

Ersattext

folgt,

siehe

auch

set/?.

rem

Das

Set-Kommando

kommt

sowohl

beim

Variablennamen

als

auch

beim

rem

Inhalt

ohne

Anführungszeichen

aus.

set

name=%name:"=%

rem

An

dieser

Stelle

sollte

erst

geprüft

werden,

ob

die

Datei

überhaupt

rem

existiert,

aber

das

würde

den

Rahmen

hier

sprengen.

copy

"%name%"

"%HOMEDRIVE%%HOMEPATH%\Eigene

Dateien"

Page 194: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Theo

retis

chkö

nnte

man

auch

mit

den

kurz

enD

atei

nam

en(8

+3)a

rbei

ten,

aber

dies

esi

ndni

chte

inde

utig

und

könn

envo

nLa

ufw

erk

zuLa

ufw

erk

unte

rsch

ied-

lich

sein

.Dah

erbe

sser

nich

tver

wen

den!

Kom

bini

erti

nde

rgeg

eben

enR

eihe

nfol

gezw

eiod

erm

ehre

redu

rch

"+"

ver-

bund

ene

Text

date

ien

inei

nern

euen

Ges

amtd

atei

.

Indi

esem

Zus

amm

enha

ngm

uss

auf

die

Bed

eutu

ngde

rPa

ram

eter

"/A

"(f

ürA

SCII

-For

mat

,der

Stan

dard

wer

t)un

d"/

B"

(für

Bin

är-F

orm

at)e

inge

gang

enw

erde

n,di

eje

dem

Dat

eina

men

inob

igem

Bei

spie

lm

itei

nem

Lee

rzei

chen

Abs

tand

vora

ngeh

enkö

nnen

.DO

S-Te

xtda

teie

nen

thal

ten

ein

Dat

eien

deze

iche

n(D

ezim

al26

,Hex

adez

imal

1A).

Bei

mK

opie

rvor

gang

darf

inde

rGes

amtd

atei

nura

lsle

tzte

sZ

eich

enei

nD

atei

ende

zeic

hen

ersc

hein

en,s

onst

wür

dede

rTex

tna

chde

rer

sten

End

mar

kier

ung

nich

tmeh

ran

geze

igt.

"cop

y"ko

pier

tohn

eda

sab

schl

ieße

nde

Zei

chen

und

fügt

als

letz

tes

wie

dere

ines

zurG

esam

tdat

eihi

nzu.

Möc

hte

man

Dat

eien

mit

binä

ren

Inha

lten

zusa

mm

enfü

gen

(z.B

.Pos

tScr

ipt-

Dat

eien

,di

eau

chbi

näre

Abs

chni

tteen

thal

ten

könn

en),

sow

ürde

ohne

Page 195: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Para

met

er"/

B"

eben

falls

nurb

iszu

eine

mzu

fälli

gvo

rkom

men

den

Dat

eien

de-

zeic

hen

kopi

ertu

ndda

mit

das

Erg

ebni

sun

brau

chba

r.

copy

/b

"seite

1.ps"

+/b

"seite

2.ps"

"Neue

Datei.ps"

Als

Ziel

date

isol

ltem

anke

ine

derQ

uelld

atei

enve

rwen

den,

dam

öglic

herw

eise

sons

tder

Inha

ltüb

ersc

hrie

ben

wir

d.

8.0.

13M

essa

ge-P

ing

Mit

Hilf

ede

sfo

lgen

den

Scri

pts

kann

man

Win

dow

sum

eine

nütz

liche

Funk

-tio

nalit

äter

wei

tern

.Mit

Hilf

evo

nm

ping

erhä

ltm

anei

neN

achr

icht

,sob

ald

derg

epin

gte

Com

pute

rwie

dere

rrei

chba

rist

.

Um

das

Scri

ptgl

obal

zuve

rwen

den,

mus

ses

z.B

.al

s"m

ping

.cm

d"in

"Win

dow

s-In

stal

latio

nsor

dner

\Sys

tem

32"

gesp

eich

ertw

erde

nun

dka

nnvo

nnu

nan

z.B

.mit

"mpi

nggo

ogle

.com

"au

fger

ufen

wer

den.

Page 196: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

@echo

off

::

wenn

kein

remote

Host

angegeben

ist,

dann

gehe

zu

:Syntax

IF

[%1]==[]

GOTO

Syntax

IF

[%1]==[/?]

GOTO

Syntax

IF

[%1]==[/h]

GOTO

Syntax

IF

[%1]==[/help]

GOTO

Syntax

:mainloop

::

pinge

den

Host

1mal

und

leite

die

Ausgabe

nach

'nul'

um

(keine

sichtbare

Ausgabe)

ping

%1

-n

1>nul

::

speichere

den

Errorlevel

in

die

Variable

'status'

set

status=%errorlevel%

::

sende

eine

Nachricht

sobald

der

remote

Host

online

ist

if

%status%==0

(msg

%username%

%1

online

&&

exit

0)

::

minimalistische

Fortschrittsanzeige

(Set

/P

i=.)

<NUL

::

sleep

workaround

(wer

eine

bessere,

einfachere,

genauere

&universellere

Möglichkeit

kennt

bitte

korrigieren)

Page 197: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

::

pinge

den

lokalen

Computer

10

mal

ping

localhost

-n

10

>nul

::

gehe

zurück

zum

anfang

goto

mainloop

:Syntax

echo.

echo

Syntax:

%~n0

[Hostname

oder

IP]

echo.

echo

mping

echo.

echo

Pingt

einen

offline

Host

und

gibt

eine

Meldung

echo

aus,

sobald

er

wieder

online

ist

echo.

8.0.

14D

efra

gm

itE

ndlo

s-Sc

hlei

fe

Das

eing

ebau

teD

efra

g-To

oler

laub

tja

imm

ernu

rdie

glei

chze

itige

Def

ragm

en-

tieru

ngei

nes

Lau

fwer

ks.A

ußer

dem

sind

oftm

als

meh

rere

Dur

chgä

nge

nötig

,bi

sda

sL

aufw

erk

wir

klic

hvo

llstä

ndig

defr

agm

entie

rtis

t.M

itdi

eser

klei

nen

Page 198: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Bat

chD

atei

wer

den

alle

Part

ition

enim

mer

wie

derh

inte

rein

ande

rdef

ragm

en-

tiert

.Wen

nm

anw

iede

rar

beite

nw

ill,k

ann

man

einf

ach

das

Ein

gabe

fens

ter

schl

ieße

n.A

uch

beil

aufe

ndem

defr

agpa

ssie

rtda

bein

icht

s,w

eild

efra

gim

Hin

terg

rund

die

aktu

elle

Arb

eits

aube

rbee

ndet

.

Dam

itab

erni

cht

defe

kte

Lau

fwer

keei

nfac

hbl

ind

defr

agm

entie

rtw

erde

n,ha

beic

hei

neet

was

aufw

endi

gePr

ozed

urei

ngeb

aut,

die

die

Lau

fwer

kem

itch

kdsk

erst

über

prüf

t.W

enn

dabe

iein

Fehl

erau

ftri

tt,w

ird

mit

fsut

ilda

sdi

rty

Bit

gese

tzt.

Das

bew

irkt

,das

sbe

imnä

chst

enSy

stem

star

tdie

Fehl

erbe

hobe

nw

erde

n.A

ußer

dem

wer

den

die

Part

ition

enin

dem

loop

ausg

elas

sen,

wel

che

scho

nal

sdi

rty

mar

kier

tsin

d.

Ein

ekl

eine

Rou

tine

war

auch

nötig

,dam

itN

etzw

erkl

aufw

erke

ausg

elas

sen

wer

den.

@echo

off

cd

/d

C:\

:loop for

%%i

in

(c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z)

do

(

Page 199: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

if

exist

%%i:\NUL

call:defrag

%%i

) echo.

echo

pause...

ping

localhost

-n

10

>NUL

goto

loop

:defrag

call:check

%1

if

"%ok%"=="nein"

(echo

Laufwerk

%1:

wird

ausgelassen

echo.

goto:eof

) echo.

echo.

echo

chkdsk

%1:

/v

chkdsk

%1:

if

%errorlevel%

NEQ

0(

if

%errorlevel%

NEQ

2(

echo

%1:

chkdsk

Fehler!!!

echo

Errorlevel:

%errorlevel%

echo.

echo

setzte

dirty-Bit:

fsutil

dirty

set

%1:

Page 200: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo.

echo

Versuche

Reparatur

chkdsk

%1:

/v

/x

if

%errorlevel%

EQU

2(

echo

Fehler

bereinigt!

)else

(echo

Errorlevel:

%errorlevel%

echo.

goto:eof

))

) echo

defrag

%1:

-f

defrag

%1:

-f

if

%errorlevel%

NEQ

0(

pause

exit

) rem

pause...

ping

localhost

-n

1>NUL

goto:eof

:checkset

ok=nein

net

use

|find

/i

"%1:"

>NUL

Page 201: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

if

not

errorlevel

1(

echo

%1:

ist

ein

Netzlaufwerk

goto:eof

) fsutil

dirty

query

%1:

for

/F

"tokens=5"

%%f

in

('fsutil

dirty

query

%1:')

do

(if

not

"%%f"=="NICHT"

(rem

Laufwerk

ist

als

fehlerhaft

markiert

goto:eof

)) set

ok=ja

goto:eof

Als

Alte

rnat

ive

gibt

esda

sO

pen

Sour

cePr

ogra

mJk

Def

rag1 ,

wel

ches

auch

alle

Lau

fwer

kena

chei

nand

erde

frag

men

tiert

.

1http://www.kessels.com/JkDefrag/

Page 202: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

8.0.

15D

atei

info

rmat

ione

nan

zeig

en

Die

ses

Bat

ch-S

krip

tze

igt

Info

rmat

ione

nüb

erdi

eD

atei

,die

als

Para

met

erüb

erge

ben

wir

d,an

.(be

ispi

elsw

eise

perD

rag&

Dro

pau

fdie

Bat

ch-D

atei

)

@echo

off

echo

Attribute...................:

%~a1

echo

Laufwerk....................:

%~d1

echo

kompletter

Pfad.............:

%~f1

echo

Dateiname...................:

%~n1

echo

Ordnerpfad..................:

%~p1

echo

kompletter

Pfad

(kurze

Form):

%~s1

echo

Aenderungsdatum.............:

%~t1

echo

Dateierweiterung............:

%~x1

echo

Dateigroesse................:

%~z1

pause

Hin

wei

s:Fa

llsdi

eA

ttrib

ute

des

eige

nen

Bat

ch-S

krip

tsau

sgel

esen

wer

den

solle

n,so

mus

sde

rPar

amet

erN

ullv

erw

ende

twer

den

(Bei

spie

lsw

eise

%˜p

0).

Ein

eK

ombi

natio

nis

tauc

hm

öglic

h,z.

B:%

˜dp0

(Lau

fwer

k+

Pfad

)

Page 203: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

8.0.

16A

lleve

rfüg

bare

nPC

sim

aktu

elle

nN

etzw

erk

such

en

Die

ses

Bat

ch-S

krip

tpi

ngt

alle

IP-A

dres

sen

eine

sIP

-Ber

eich

san

und

zeig

tda

nndi

ePC

san

,die

verf

ügba

rsin

d.

@echo

off

if

exist

ips.txt

del

ips.txt

>nul

echo

Bitte

geben

Sie

den

ersten

Teil

der

IP

ein:

set

/p

ip=

for

/L

%%N

IN

(1,

1,

255)

DO

(echo

Die

IP:

%ip%%%N

wird

nun

angepingt

ping

%ip%%%N

-n

1-w

1|

find

"TTL"

&&

echo

%ip%%%N

>>

ips.txt

) cls

type

ips.txt

pause

>nul

Page 204: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Hin

wei

s:D

ieD

atei

ips.

txt

wir

dni

cht

gelö

scht

,da

mit

man

sie

für

wei

tere

Zw

ecke

benu

tzen

kann

.

8.0.

17H

osts

Dat

eim

itei

nem

Alia

snam

enun

dde

rak

tuel

len

IP-A

dres

seak

tual

isie

ren

Häu

figw

erde

nW

ebse

rver

oder

ähnl

iche

Prog

ram

me

unte

rAng

abe

eine

sA

li-as

nam

ens

inst

allie

rt,d

amit

sie

leic

htau

fein

enan

dere

nR

echn

erve

rsch

oben

wer

den

könn

en,

falls

der

ursp

rüng

liche

Rec

hner

defe

ktis

t.O

der

die

Apl

i-ka

tionl

äuft

unte

rV

M-W

are

auf

eine

nL

apto

pbe

idem

sich

die

IP-A

dres

sen

häufi

gän

dern

.Dan

nka

nnm

itde

mSk

riptd

erH

ostn

amen

alia

smit

dera

ktue

llen

IP-A

dres

seak

tual

isie

rtw

erde

n.Id

eale

rwei

sew

irdda

sSc

ripta

utom

atis

chbe

imSt

artv

onW

indo

ws

oder

beim

Anm

elde

nde

sA

nwen

ders

ausg

efüh

rt.

@echo

off

set

HOST_ALIAS=myserver

myserver.mydomain.org

set

HOST_FILE=%SystemRoot%\System32\drivers\etc\hosts

set

TEMP_FILE=%TEMP%\hosts.tmp

Page 205: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

REM

vorhandenen

Eintrag

entfernen

und

den

Rest

in

TEMP-Datei

schreiben

type

%HOST_FILE%

|find

/v

"myserver"

>%TEMP_FILE%

REM

Neuen

Eintrag

wieder

hinzufügen

for

/F

"tokens=15"

%%i

in

('ipconfig

^|

find

"IP

Ad"')

do

set

IP=%%i

echo

%IP%

%HOST_ALIAS%>>%TEMP_FILE%

echo

##

Added

%IP%

%HOST_ALIAS%

to

the

hostsfile

REM

Temp-File

nach

%SystemRoot%\System32\drivers\etc\hosts

kopieren

REM

Die

Datei

Hosts

darf

nicht

mit

"move"

verschoben

werde,

sondern

muss

kopiert

werden,

da

sonst

der

Hostname

nicht

gefunden

werden

kann.

copy

/y

%TEMP_FILE%

%HOST_FILE%

del

/F

/Q

%TEMP_FILE%

8.0.

18W

indo

wsv

ersi

onhe

raus

finde

n

Mit

dies

erB

atch

date

ifin

det

man

hera

us,w

elch

eW

indo

wsv

ersi

onve

rwen

-de

twir

d.D

asis

tnüt

zlic

h,w

enn

man

mit

best

imm

ten

Pfad

enar

beite

t,di

eje

Page 206: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

nach

Bet

rieb

ssys

tem

vers

chie

den

sind

.Hie

rwir

dda

sE

rgeb

nis

mith

ilfe

eine

rV

BSc

ript

Msg

Box

ausg

egeb

en.

@echo

off

@echo

off

VER

|find

/i

"Windows

95"

>NUL

IF

NOT

ERRORLEVEL

1GOTO

9598ME

VER

|find

/i

"Windows

98"

>NUL

IF

NOT

ERRORLEVEL

1GOTO

9598ME

VER

|find

/i

"Windows

Millennium"

>NUL

IF

NOT

ERRORLEVEL

1GOTO

9598ME

VER

|find

"XP"

>nul

IF

%errorlevel%

EQU

0GOTO

XP

VER

|find

"Microsoft

Windows

2000"

>NUL

IF

%errorlevel%

EQU

0GOTO

2000

VER

|find

"NT"

>nul

IF

%errorlevel%

EQU

0GOTO

NT

VER

|find

"Microsoft

Windows

[Version

6.1"

>nul

IF

%errorlevel%

EQU

0GOTO

Sieben

VER

|find

"Microsoft

Windows

[Version

6"

>nul

IF

%errorlevel%

EQU

0GOTO

Vista

VER

|find

"Microsoft

Windows

[Version

5"

>nul

Page 207: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

IF

%errorlevel%

EQU

0GOTO

2003

goto

unknown

goto

end

:unknown

echo

MsgBox

"Betriebssystem

unbekannt",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:9598ME

echo

MsgBox

"Sie

benutzten

95,

98

oder

ME",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:NT

echo

MsgBox

"Sie

benutzten

Windows

NT",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:2003

echo

MsgBox

"Sie

benutzten

Windows

2003",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:2000

Page 208: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

echo

MsgBox

"Sie

benutzten

Windows

2000",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:XP

echo

MsgBox

"Sie

benutzten

Windows

XP",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:Vista

echo

MsgBox

"Sie

benutzten

Windows

Vista

oder

Windows

7RC",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:Sieben

echo

MsgBox

"Sie

benutzten

Windows

7",

VbInformation

+VbOKOnly,

"Ihr

Betriebssystem"

>%TEMP%\os.vbs

goto

end

:end

START

%TEMP%\os.vbs

ping

1.2.3.4

-n

1-w

5000

>nul

del

/f

%TEMP%\os.vbs

Page 209: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

8.0.

19T

EM

P-Ve

rzei

chni

slös

chen

Im%

TEM

P%-V

erze

ichn

issa

mm

eln

sich

mit

derZ

eitv

iele

Dat

eien

und

Unt

er-

verz

eich

niss

ean

.Mit

dies

emSk

ript

wer

den

alle

aufe

inm

alge

lösc

ht:

@echo

off

call:clean

%TEMP%

IF

NOT

"%TEMP%"

==

"%TMP%"

(call:clean

%TMP%

) pause

goto:eof

:cleandel

/q

"%~1\*.*"

FOR

/D

%%D

IN

("%~1\*")

DO

(rmdir

/s

/q

"%%D"

)goto:eof

Page 210: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

(Wah

rsch

einl

ich

erhä

ltm

anei

npa

arFe

hler

,wen

nz.

B.D

atei

enge

öffn

etsi

nd)

Neu

eVe

rsio

n

Ein

eV

ersi

onfü

rWin

XP/

2000

/Win

Vis

ta/W

in7

Echo

off

del

/f

/s

/q

"%HOMEPATH%\Lokale

Einstellungen\Temp\*.*"

del

/f

/s

/q

"%HOMEPATH%\Lokale

Einstellungen\Temporary

Internet

Files\*.*"

del

/f

/s

/q

"%HOMEPATH%\Lokale

Einstellungen\Verlauf\*.*"

del

/f

/s

/q

"%windir%\Temp\*.*"

del

/f

/s

/q

"%windir%\Prefetch\*.*"

del

/f

/s

/q

"%windir%\Temp\*.*"

rmdir

/s

/q

"%HOMEPATH%\Lokale

Einstellungen\Temp\"

rmdir

/s

/q

"%windir%\Prefetch\"

diskperf

-n

ipconfig

/flushdns

Ein

fach

den

Text

kopi

eren

inei

neTe

xtda

deiu

ndzu

r.ba

tmac

hen.

Page 211: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 212: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

9Z

usat

z-To

ols

Vie

leA

ufga

ben

sind

mit

der

Bat

chpr

ogra

mm

ieru

ngbz

w.

mit

Win

dow

s-Sc

ript

ing

alle

ine

kaum

oder

nur

sehr

umst

ändl

ich

zulö

sen.

Soka

nnda

sU

mw

ande

lnvo

nD

atei

en(T

exte

rset

zung

en)a

ufgr

und

dern

icht

ganz

saub

eren

Beh

andl

ung

von

Sond

er-b

zw.O

pera

tions

zeic

hen

zurQ

ualw

erde

n.Er

stau

nlic

hfü

rein

Bet

rieb

ssys

tem

,wel

ches

seit

nun

meh

rübe

r10

Jahr

en-m

itW

indo

ws

95-d

iese

Res

trik

tione

nof

fizie

llbe

seiti

gtha

t.

205

Page 213: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Oft

könn

enda

fürO

penS

ourc

e-To

ols

wie

SFK

("Sw

iss

File

Kni

ve")

1un

dSe

d2

sehr

erfo

lgre

ich

indi

eB

atch

-Pro

gram

mie

rung

eing

ebun

den

wer

den.

Fürd

asV

erpa

cken

und

Kom

prim

iere

nvo

nD

atei

enlä

sst

sich

das

frei

e7-

Zip

3gu

tüb

erdi

eK

omm

ando

zeile

steu

ern.

Das

GPL

-Pro

gram

mG

nupl

otei

gnet

sich

herv

orra

gend

fürd

ieV

isua

lisie

rung

von

Dat

enim

CSV

-For

mat

und

läss

tsic

hei

nfac

her

und

schn

elle

rsc

ript

enal

sM

SE

xcel

oder

OO

.org

Cal

c.Z

umH

er-

unte

rlad

envo

nD

atei

enun

dW

ebse

iten

kann

Wge

tver

wen

detw

erde

n.A

uch

fürB

atch

-Dat

eien

gibt

esdi

vers

eko

sten

lose

Bat

ch-C

ompi

ler,

die

die

Dat

eiin

eine

ausf

ührb

are

.exe

-Dat

eium

wan

deln

und

den

Cod

evo

rMan

ipul

atio

nun

d/o-

derC

opyr

ight

-Ver

letz

unge

nsc

hütz

en.F

ürge

hobe

nere

Scri

ptin

g-A

nspr

üche

und

kom

plex

ere

Vorh

aben

mit

eine

rlän

gere

nL

eben

sdau

erso

llten

dezi

dier

teSc

riptin

g-Sp

rach

enz.

B.A

wk,

Perl4 ,P

ytho

n,R

uby

oder

Tcli

nEr

wäg

ung

gezo

-ge

nw

erde

n,fü

rdie

glüc

klic

herw

eise

das

GN

U-P

roje

ktfr

eie

und

quel

loff

ene

Alte

rnat

iven

biet

et.

1http://swissfileknife.sourceforge.net/

2http://de.wikipedia.org/wiki/Sed%20%28Unix%29

3http://www.7-zip.org/

4http://de.wikibooks.org/wiki/Perl

Page 214: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Ein

eko

sten

lose

Alte

rnat

ive

zum

Bat

chin

gbi

etet

Mic

roso

ftse

lbst

aufs

eine

rH

omep

age

mit

dem

Tool

Pow

erSh

ell.

Wei

tere

Tool

ssin

dim

Abs

chni

tt"W

ebL

inks

"au

fgel

iste

t!

Page 215: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 216: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

10R

efer

enz

10.1

Lis

teal

ler

inte

rnen

und

exte

rnen

Bef

ehle

(ent

spri

chtd

erA

usga

bede

sBef

ehlshelp

unte

rW

indo

wsX

P)

ASS

OC

Zei

gtD

atei

erw

eite

rung

szuo

rdnu

ngen

anbz

w.ä

nder

tsie

.AT

Leg

tein

eZ

eitf

est,

zude

rBef

ehle

und

Prog

ram

me

auf

dies

emC

ompu

tera

usge

führ

twer

den.

ATT

RIB

Zei

gtD

atei

attr

ibut

ean

bzw

.änd

erts

ie.

209

Page 217: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

BR

EA

KSc

halte

tdie

erw

eite

rte

Übe

rprü

fung

fürS

TR

G+C

ein

bzw

.aus

.C

AC

LS

Zei

gtD

atei

-AC

Ls

(Acc

ess

Con

trol

Lis

t)an

bzw

.änd

ert

sie.

CA

LL

Ruf

tein

eB

atch

date

iaus

eine

rand

eren

Bat

chda

teih

er-

aus

auf.

CD

Zei

gtde

nN

amen

des

aktu

elle

nV

erze

ichn

isse

san

bzw

.än

dert

dies

en.

CH

CP

Zei

gtdi

eak

tive

Cod

epag

enum

mer

anbz

w.l

egtd

iese

fest

.C

HD

IRZ

eigt

den

Nam

ende

sak

tuel

len

Ver

zeic

hnis

ses

anbz

w.

ände

rtdi

esen

.C

HK

DSK

Übe

rprü

ftei

nen

Dat

entr

äger

und

zeig

tein

enSt

atus

be-

rich

tan.

CH

KN

TFS

Zei

gtdi

berp

rüfu

ngde

sD

aten

träg

ers

beim

Star

tan

bzw

.ver

ände

rtsi

e.C

LS

Lös

chtd

enB

ildsc

hirm

inha

lt.

Page 218: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

CM

DSt

arte

tein

ene

ueIn

stan

zde

sW

indo

ws-

Bef

ehls

inte

rpre

ters

.C

OL

OR

Leg

tdie

Hin

terg

rund

-und

Vor

derg

rund

farb

enfü

rdie

Kon

sole

fest

.C

OM

PV

ergl

eich

tden

Inha

ltzw

eier

Dat

eien

oder

Sätz

evo

nD

atei

en.

CO

MPA

CT

Zei

gtdi

eK

ompr

imie

rung

von

Dat

eien

aufN

TFS

-Pa

rtiti

onen

anbz

w.ä

nder

tdie

se.

CO

NV

ER

TK

onve

rtie

rtFA

T-V

olum

esin

NT

FS.D

asak

tuel

leL

auf-

wer

kka

nnni

chtk

onve

rtie

rtw

erde

n.C

OPY

Kop

iert

eine

oder

meh

rere

Dat

eien

anei

nean

dere

Stel

le.

DAT

EZ

eigt

das

Dat

uman

bzw

.leg

tdie

ses

fest

.D

EL

Lös

chte

ine

oder

meh

rere

Dat

eien

.D

IRL

iste

tdie

Dat

eien

und

Unt

erve

rzei

chni

sse

eine

sV

er-

zeic

hnis

ses

auf.

DIS

KC

OM

PV

ergl

eich

tden

Inha

ltvo

nzw

eiD

iske

tten.

DIS

KC

OPY

Kop

iert

den

Inha

ltvo

nei

nerD

iske

tteau

fein

ean

dere

Dis

kette

.

Page 219: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

DO

SKE

YB

earb

eite

tBef

ehls

eing

aben

,ruf

tWin

dow

s-B

efeh

lezu

rück

tund

erst

ellt

Mac

ros.

EC

HO

Zei

gtM

eldu

ngen

anbz

w.s

chal

tetd

ieB

efeh

lsan

zeig

eei

nod

erau

s.E

ND

LO

CA

LB

eend

etde

nlo

kale

nG

ültig

keits

bere

ich

von

Um

ge-

bung

sänd

erun

gen

inei

nerB

atch

date

i.E

RA

SEL

ösch

tein

eod

erm

ehre

reD

atei

en.

EX

ITB

eend

etda

sPr

ogra

mm

CM

D.E

XE

(Bef

ehls

inte

rpre

ter)

.FC

Ver

glei

chtz

wei

oder

meh

rSät

zevo

nD

atei

enun

dze

igt

die

Unt

ersc

hied

ean

.FI

ND

Such

tein

eZ

eich

enke

ttein

eine

rode

rmeh

rere

nD

a-te

i(en

).FI

ND

STR

Such

tZei

chen

kette

nin

Dat

eien

.FO

RFü

hrte

inen

ange

gebe

nen

Bef

ehlf

ürje

deD

atei

inei

nem

Dat

eien

satz

aus.

FOR

MAT

Form

atie

rtei

nen

Dat

entr

äger

fürd

ieV

erw

endu

ngm

itW

indo

ws.

Page 220: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

FTY

PEZ

eigt

die

Dat

eity

pen

an,d

iebe

iden

Zuo

rdnu

ngen

für

die

ents

prec

hend

enD

atei

erw

eite

rung

enve

rwen

detw

er-

den

bzw

.änd

erts

ie.

GE

TM

AC

Zei

gtun

terW

indo

ws

XP

SP2

die

Mac

-Adr

esse

an.

GO

TOSe

tztd

enW

indo

ws-

Bef

ehls

inte

rpre

tera

ufei

nem

arki

er-

teZ

eile

inei

nem

Bat

chpr

ogra

mm

.G

RA

FTA

BL

Erm

öglic

htW

indo

ws,

Sond

erze

iche

nim

Gra

fikm

odus

anzu

zeig

en.

HE

LP

Zei

gtH

ilfei

nfor

mat

ione

nzu

Win

dow

s-B

efeh

len

an.

IFV

erar

beite

tAus

drüc

kein

eine

rBat

chda

teia

bhän

gig

von

Bed

ingu

ngen

.L

AB

EL

Ers

tellt

,änd

erto

derl

ösch

tdie

Bez

eich

nung

eine

sV

olu-

mes

.M

DE

rste

lltei

nV

erze

ichn

isM

KD

IRE

rste

lltei

nV

erze

ichn

is.

MO

DE

Kon

figur

iert

ein

Syst

emge

rät.

MO

RE

Zei

gtA

usga

beau

fdem

Bild

schi

rmse

itenw

eise

an.

Page 221: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

MO

VE

Ver

schi

ebte

inod

erm

ehre

reD

atei

envo

nei

nem

Ver

-ze

ichn

isin

ein

ande

res.

NE

TU

SEV

erbi

ndet

eine

nC

ompu

term

itei

nerf

reig

egeb

enen

Res

-so

urce

oder

tren

ntdi

eV

erbi

ndun

gun

dze

igtI

nfor

ma-

tione

nüb

erdi

eV

erbi

ndun

gen

eine

sC

ompu

ters

an.D

erB

efeh

lste

uert

auße

rdem

stän

dige

Net

zwer

kver

bind

un-

gen.

PAT

HL

egtd

enSu

chpf

adfü

raus

führ

bare

Dat

eien

fest

oder

zeig

tdie

sen

an.

PAU

SEH

ältd

ieA

usfü

hrun

gei

nerB

atch

date

ian

und

zeig

tein

eM

eldu

ngan

.PO

PDW

echs

eltz

ude

mV

erze

ichn

is,d

asdu

rch

PUSH

Dge

spei

-ch

ertw

urde

.PR

INT

Dru

ckte

ine

Text

date

i.PR

OM

PTÄ

nder

tdie

Ein

gabe

auff

orde

rung

.PU

SHD

Spei

cher

tdas

aktu

elle

Ver

zeic

hnis

,und

wec

hsel

tdan

nzu

eine

man

dere

nV

erze

ichn

is.

RD

Ent

fern

tein

Ver

zeic

hnis

.

Page 222: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

RE

CO

VE

RSt

ellt

lesb

are

Dat

envo

nei

nem

besc

hädi

gten

Dat

entr

ä-ge

rwie

derh

er.

RE

ML

eite

tKom

men

tare

inei

nerB

atch

date

ibzw

.CO

N-

FIG

.SY

Sei

n.R

EN

Ben

ennt

eine

Dat

eibz

w.D

atei

enum

.R

EN

AM

EB

enen

ntei

neD

atei

bzw

.Dat

eien

um.

RE

PLA

CE

Ers

etzt

Dat

eien

.R

MD

IRL

ösch

tein

Ver

zeic

hnis

.SE

TSe

tzto

derl

ösch

tdie

Um

gebu

ngsv

aria

blen

bzw

.zei

gtsi

ean

.SE

TL

OC

AL

Beg

innt

den

loka

len

Gül

tigke

itsbe

reic

hvo

nU

mge

bung

s-än

deru

ngen

inei

nerB

atch

date

i.SH

IFT

Ver

ände

rtdi

ePo

sitio

ner

setz

bare

rPar

amet

erin

Bat

chda

-te

ien.

SOR

TSo

rtie

rtdi

eE

inga

be.

STA

RT

Star

tete

inei

gene

sFe

nste

r,um

ein

best

imm

tes

Pro-

gram

mod

erei

nen

Bef

ehla

uszu

führ

en.

SUB

STW

eist

eine

mPf

adei

nen

Lau

fwer

ksbu

chst

aben

zu.

Page 223: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

TASK

LIS

TZ

eigt

alle

zurz

eitl

aufe

nden

Auf

gabe

nin

klus

ive

der

Die

nste

an.

TASK

KIL

LB

rich

tein

enla

ufen

den

Proz

ess

oder

eine

Anw

endu

ngab

oder

been

deti

hnbz

w.s

ie.

TIM

EZ

eigt

die

Syst

emze

itan

bzw

.leg

tsie

fest

.T

ITL

EL

egtd

enFe

nste

rtite

lfür

das

Ein

gabe

auff

orde

rung

sfen

s-te

rfes

t.T

RE

EZ

eigt

die

Ord

ners

truk

ture

ines

Lau

fwer

ksod

erPf

ads

grafi

sch

an.

TY

PEZ

eigt

den

Inha

ltei

nerT

extd

atei

an.

VE

RZ

eigt

die

Win

dow

s-V

ersi

onan

.V

ER

IFY

Leg

tfes

t,ob

über

wac

htw

erde

nso

ll,ob

Dat

eien

korr

ekt

aufd

enD

aten

träg

erge

schr

iebe

nw

erde

n.V

OL

Zei

gtdi

eD

aten

träg

ervo

lum

ebez

eich

nung

und

die

Seri

-en

num

mer

an.

XC

OPY

Kop

iert

Dat

eien

und

Ver

zeic

hnis

bäum

e.

Page 224: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

11W

ebL

inks

11.1

Web

links

•ht

tp://

ww

w.h

eise

.de/

ct/0

3/16

/136

/def

ault.

shtm

l1c'

t16

/200

3,S.

136:

Win

dow

s-B

efeh

lsze

ile•

http

://w

ww

.ss6

4.co

m/n

t/ind

ex.h

tml2

NT

/XP

Bat

chB

efeh

le(e

n)

1http://www.heise.de/ct/03/16/136/default.shtml

2http://www.ss64.com/nt/index.html

217

Page 225: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

•ht

tp://

ww

w.a

dmin

i.de3

Um

fang

reic

heIn

form

atio

nen

über

Bat

chpr

ogra

m-

mie

rung

unte

rNT

/200

0/X

P•

http

://w

ww

.fpsc

hultz

e.de

/4B

atch

Scri

ptin

gSi

tem

itvi

elen

Bei

spie

len

•ht

tp://

sven

-of-

nine

.de/

site

/dok

u.ph

p/fa

q:ba

tch5

Um

fang

reic

heFu

nktio

ns-

sam

mlu

ngfü

rBat

chpr

ogra

mm

iere

r•

http

://w

ww

.kno

ww

are.

de/?

cat=

6.1&

book

=bat

ch•

http

://do

wnl

oad.

know

war

e.de

/bat

ch.p

df6

Leic

htve

rstä

ndlic

heEi

nfüh

rung

•ht

tp://

publ

ibz.

boul

der.i

bm.c

om/c

gi-b

in/b

ookm

gr_-

OS3

90/B

OO

KS/

IEA

2B51

0/C

CO

NTE

NTS

?SH

ELF=

IEA

2BK

32&

DN

=SA

22-

7598

-01&

DT

=200

1062

6133

9387

engl

isch

spra

chig

esJC

LB

enut

zerh

and-

buch

3http://www.admini.de

4http://www.fpschultze.de/

5http://sven-of-nine.de/site/doku.php/faq:batch

6http://download.knowware.de/batch.pdf

7http://publibz.boulder.ibm.com/cgi-bin/bookmgr_

OS390/BOOKS/IEA2B510/CCONTENTS?SHELF=IEA2BK32&DN=

SA22-7598-01&DT=20010626133938

Page 226: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

•ht

tp://

ww

w.p

logm

ann.

net/w

/2/5

4/in

dex.

htm

8-O

ptio

nen

desB

efeh

lsX

CO

-PY

•ht

tp://

ww

w.a

nton

is.d

e/do

s/#d

ownl

oad/

9D

iver

seB

eisp

iels

krip

te•

http

://w

ww

.eas

y-co

ding

.de/

shel

lscr

iptin

g.ht

ml?

s=5f

b492

fd4b

515b

0c88

0795

a6a7

d92e

f5c4

aed2

9c10

Foru

müb

erSh

ells

crip

ting

•ht

tp://

hom

e.m

net-o

nlin

e.de

/hor

st.m

uc/m

aind

.htm

11Ei

neSa

mm

lung

von

Zu-

satz

tool

sfü

rBat

ch-S

krip

ter

•ht

tp://

ww

w.a

xel-

hahn

.de/

axel

/pag

e_co

mpi

/bat

_ind

ex.h

tm12

Vie

lew

eite

reIn

form

atio

nen

und

Tool

szu

mT

hem

a•

http

://w

ww

.scr

ipt-e

xam

ple.

com

/them

en/W

indo

ws_

Bat

ch.p

hp13

Bat

chD

atei

-en

erst

elle

nfü

rabs

olut

eB

egin

ner

8http://www.plogmann.net/w/2/54/index.htm

9http://www.antonis.de/dos/#download/

10http://www.easy-coding.de/shellscripting.html?s=

5fb492fd4b515b0c880795a6a7d92ef5c4aed29c

11http://home.mnet-online.de/horst.muc/maind.htm

12http://www.axel-hahn.de/axel/page_compi/bat_index.htm

13http://www.script-example.com/themen/Windows_Batch.php

Page 227: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

11.1

.1Tu

tori

als

•B

atch

forR

unaw

ays

Part

I14-T

utor

ialB

atch

I•

Bat

chfo

rRun

away

sPa

rtII

15-T

utor

ialB

atch

II•

Bat

chfo

rRun

away

sPa

rtII

I16-T

utor

ialB

atch

III

•D

ieFo

r-Sc

hlei

fe17

-Tut

oria

l"FO

R"

•V

aria

blen

18-T

utor

ialU

mge

bung

svar

iabl

en

14http://www.administrator.de/Workshop_Batch_for_Runaways_-_

Part_I_-_Beispiel_FindLongPath.Bat_Bedenklich_lange_Pfade_

finden.html

15http://www.administrator.de/Workshop_Batch_for_Runaways_-_

Part_II_-__Ein_bisschen_Handwerkszeug.html

16http://www.administrator.de/Workshop_Batch_for_Runaways_-_

Part_III_-_Datums-_und_Zeitvariablen_im_Batch.html

17http://www.administrator.de/Tutorial_zur_FOR-Schleife.html

18http://www.administrator.de/Wie_Arbeite_ich_mit_Batch_

UmgebungsVariablen%3F_Erstellung_Umgang_Erweiterungen_Ver%

C3%A4nderungen.html

Page 228: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

11.1

.2R

efer

enze

n

•M

icro

soft

Tech

net19

-Win

dow

sSe

rver

2008

-Com

man

dR

efer

ence

(en)

•M

icro

soft

Tech

net20

-W

indo

ws

Vis

ta-

Com

man

d-L

ine

Tool

sTe

chni

cal

Ref

eren

ce(e

n)•

Mic

roso

ftTe

chne

t21-W

indo

ws

Serv

er20

03-B

efeh

lsze

ilenr

efer

enz

(de)

•M

icro

soft

Tech

net22

-Win

dow

sX

P-C

omm

and-

line

refe

renc

eA

-Z(e

n)

19http://technet.microsoft.com/en-us/library/cc754340.aspx

20http://technet.microsoft.com/en-us/library/cc722159.aspx

21http://technet.microsoft.com/de-de/library/cc785423.aspx

22http://technet.microsoft.com/en-us/library/bb490890.aspx

Page 229: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 230: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

12A

utor

en

Edi

tsU

ser

2A

lizda

ir1

1A

quar

iaN

R2

2A

utor

3

1http://de.wikibooks.org/w/index.php?title=Benutzer:

Alizdair

2http://de.wikibooks.org/w/index.php?title=Benutzer:

AquariaNR

3http://de.wikibooks.org/w/index.php?title=Benutzer:Autor

223

Page 231: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

2A

zaël

4

7B

astie

5

13B

atch

scri

pter

936

2B

lingn

ue7

1B

oern

998

10C

odej

unki

e9

1C

orne

liusW

asm

und10

4http://de.wikibooks.org/w/index.php?title=Benutzer:

Aza%C3%ABl

5http://de.wikibooks.org/w/index.php?title=Benutzer:Bastie

6http://de.wikibooks.org/w/index.php?title=Benutzer:

Batchscripter93

7http://de.wikibooks.org/w/index.php?title=Benutzer:

Blingnue

8http://de.wikibooks.org/w/index.php?title=Benutzer:Boern99

9http://de.wikibooks.org/w/index.php?title=Benutzer:

Codejunkie

10http://de.wikibooks.org/w/index.php?title=Benutzer:

CorneliusWasmund

Page 232: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1C

reib

ens11

7D

anie

lB12

1D

erL

eo13

20D

irk

Hue

nnig

er14

1D

onQ

uich

ot15

1E

ˆ(ni

x)16

2E

mes

2k17

11http://de.wikibooks.org/w/index.php?title=Benutzer:

Creibens

12http://de.wikibooks.org/w/index.php?title=Benutzer:

Daniel_B

13http://de.wikibooks.org/w/index.php?title=Benutzer:Der_Leo

14http://de.wikibooks.org/w/index.php?title=Benutzer:

Dirk_Huenniger

15http://de.wikibooks.org/w/index.php?title=Benutzer:

DonQuichot

16http://de.wikibooks.org/w/index.php?title=Benutzer:

E%5E%28nix%29

17http://de.wikibooks.org/w/index.php?title=Benutzer:Emes2k

Page 233: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1E

nom

il18

1F.

F.Fj

odor

19

2Fe

hler

korr

ektu

r20

2Fl

omin

ator

21

21G

enri

ch22

4G

loba

l667

23

1H

addo

ck24

18http://de.wikibooks.org/w/index.php?title=Benutzer:Enomil

19http://de.wikibooks.org/w/index.php?title=Benutzer:

F._F._Fjodor

20http://de.wikibooks.org/w/index.php?title=Benutzer:

Fehlerkorrektur

21http://de.wikibooks.org/w/index.php?title=Benutzer:

Flominator

22http://de.wikibooks.org/w/index.php?title=Benutzer:Genrich

23http://de.wikibooks.org/w/index.php?title=Benutzer:

Global667

24http://de.wikibooks.org/w/index.php?title=Benutzer:Haddock

Page 234: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1H

ardy

4225

5H

eule

r0626

4H

jher

bert

27

2Ja

ho48

9628

2Ja

n29

1Jo

ddel

30

7Jo

hann

a3131

25http://de.wikibooks.org/w/index.php?title=Benutzer:Hardy42

26http://de.wikibooks.org/w/index.php?title=Benutzer:

Heuler06

27http://de.wikibooks.org/w/index.php?title=Benutzer:

Hjherbert

28http://de.wikibooks.org/w/index.php?title=Benutzer:

Jaho4896

29http://de.wikibooks.org/w/index.php?title=Benutzer:Jan

30http://de.wikibooks.org/w/index.php?title=Benutzer:Joddel

31http://de.wikibooks.org/w/index.php?title=Benutzer:

Johanna31

Page 235: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

17Ju

etho

32

1K

lart

ext33

16K

laus

Eif

ert34

1K

leid

ersa

ck35

1K

omik

aa36

6K

rono

s86m

37

7M

F-W

arbu

rg38

32http://de.wikibooks.org/w/index.php?title=Benutzer:Juetho

33http://de.wikibooks.org/w/index.php?title=Benutzer:

Klartext

34http://de.wikibooks.org/w/index.php?title=Benutzer:

Klaus_Eifert

35http://de.wikibooks.org/w/index.php?title=Benutzer:

Kleidersack

36http://de.wikibooks.org/w/index.php?title=Benutzer:Komikaa

37http://de.wikibooks.org/w/index.php?title=Benutzer:

Kronos86m

38http://de.wikibooks.org/w/index.php?title=Benutzer:

MF-Warburg

Page 236: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

5M

icha

elFr

ey39

2M

icha

elFr

eyTo

ol40

7M

ichf

rm41

11M

jcha

el42

1N

omik

e43

3O

crho

44

2Pc

-wor

ld45

39http://de.wikibooks.org/w/index.php?title=Benutzer:

MichaelFrey

40http://de.wikibooks.org/w/index.php?title=Benutzer:

MichaelFreyTool

41http://de.wikibooks.org/w/index.php?title=Benutzer:Michfrm

42http://de.wikibooks.org/w/index.php?title=Benutzer:Mjchael

43http://de.wikibooks.org/w/index.php?title=Benutzer:Nomike

44http://de.wikibooks.org/w/index.php?title=Benutzer:Ocrho

45http://de.wikibooks.org/w/index.php?title=Benutzer:

Pc-world

Page 237: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1Pe

perk

orn46

1Pr

ince

Kas

sad47

1Pr

odun

is48

6Pr

og49

6R

esek

a50

3R

ober

t51

10R

obid

og52

46http://de.wikibooks.org/w/index.php?title=Benutzer:

Peperkorn

47http://de.wikibooks.org/w/index.php?title=Benutzer:

Prince_Kassad

48http://de.wikibooks.org/w/index.php?title=Benutzer:

Produnis

49http://de.wikibooks.org/w/index.php?title=Benutzer:Prog

50http://de.wikibooks.org/w/index.php?title=Benutzer:Reseka

51http://de.wikibooks.org/w/index.php?title=Benutzer:Robert

52http://de.wikibooks.org/w/index.php?title=Benutzer:Robidog

Page 238: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

25Sc

hnei

jo53

1Se

4598

54

1St

efan

Maj

ewsk

y55

1St

efan

wic

hman

n56

1St

efan

Tira

n57

3St

efan

ldp8

8558

2Sy

s.B

ak59

53http://de.wikibooks.org/w/index.php?title=Benutzer:

Schneijo

54http://de.wikibooks.org/w/index.php?title=Benutzer:Se4598

55http://de.wikibooks.org/w/index.php?title=Benutzer:

Stefan_Majewsky

56http://de.wikibooks.org/w/index.php?title=Benutzer:

Stefan_wichmann

57http://de.wikibooks.org/w/index.php?title=Benutzer:

StefanTiran

58http://de.wikibooks.org/w/index.php?title=Benutzer:

Stefanldp885

59http://de.wikibooks.org/w/index.php?title=Benutzer:Sys.Bak

Page 239: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

6T

hePa

cker

60

1T

here

sno

glob

alw

arm

ing61

10Ti

mon

.Fre

itag62

1T

schä

fer63

2U

we.

kaus

ch64

2W

eißN

ix65

60http://de.wikibooks.org/w/index.php?title=Benutzer:

ThePacker

61http://de.wikibooks.org/w/index.php?title=Benutzer:

Theres_no_global_warming

62http://de.wikibooks.org/w/index.php?title=Benutzer:

Timon.Freitag

63http://de.wikibooks.org/w/index.php?title=Benutzer:

Tsch%C3%A4fer

64http://de.wikibooks.org/w/index.php?title=Benutzer:

Uwe.kausch

65http://de.wikibooks.org/w/index.php?title=Benutzer:

Wei%C3%9FNix

Page 240: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

1W

olfg

angb

eyer

66

3W

orke

r67

66http://de.wikibooks.org/w/index.php?title=Benutzer:

Wolfgangbeyer

67http://de.wikibooks.org/w/index.php?title=Benutzer:Worker

Page 241: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 242: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Abb

ildun

gsve

rzei

chni

s

•G

FDL

:Gnu

Free

Doc

umen

tatio

nL

icen

se.http://www.gnu.org/

licenses/fdl.html

•cc

-by-

sa-3

.0:C

reat

ive

Com

mon

sA

ttrib

utio

nSh

areA

like

3.0

Lic

ense

.http://creativecommons.org/licenses/by-sa/3.0/

•cc

-by-

sa-2

.5:C

reat

ive

Com

mon

sA

ttrib

utio

nSh

areA

like

2.5

Lic

ense

.http://creativecommons.org/licenses/by-sa/2.5/

•cc

-by-

sa-2

.0:C

reat

ive

Com

mon

sA

ttrib

utio

nSh

areA

like

2.0

Lic

ense

.http://creativecommons.org/licenses/by-sa/2.0/

235

Page 243: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

•cc

-by-

sa-1

.0:C

reat

ive

Com

mon

sA

ttrib

utio

nSh

areA

like

1.0

Lic

ense

.http://creativecommons.org/licenses/by-sa/1.0/

•cc

-by-

2.0:

Cre

ativ

eC

omm

ons

Attr

ibut

ion

2.0

Lic

ense

.http://

creativecommons.org/licenses/by/2.0/

•cc

-by-

2.0:

Cre

ativ

eC

omm

ons

Attr

ibut

ion

2.0

Lic

ense

.http://

creativecommons.org/licenses/by/2.0/deed.en

•cc

-by-

2.5:

Cre

ativ

eC

omm

ons

Attr

ibut

ion

2.5

Lic

ense

.http://

creativecommons.org/licenses/by/2.5/deed.en

•cc

-by-

3.0:

Cre

ativ

eC

omm

ons

Attr

ibut

ion

3.0

Lic

ense

.http://

creativecommons.org/licenses/by/3.0/deed.en

•G

PL:

GN

UG

ener

alPu

blic

Lic

ense

.http://www.gnu.org/

licenses/gpl-2.0.txt

•L

GPL

:G

NU

Les

ser

Gen

eral

Publ

icL

icen

se.http://www.gnu.

org/licenses/lgpl.html

Page 244: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

•PD

:Thi

sim

age

isin

the

publ

icdo

mai

n.

•A

TT

R:

The

copy

righ

tho

lder

ofth

isfil

eal

low

san

yone

tous

eit

for

any

purp

ose,

prov

ided

that

the

copy

righ

thol

der

ispr

oper

lyat

trib

uted

.R

edis

trib

utio

n,de

rivat

ive

wor

k,co

mm

erci

alus

e,an

dal

loth

erus

eis

perm

itted

.

•EU

RO

:Thi

sis

the

com

mon

(rev

erse

)fac

eof

aeu

roco

in.T

heco

pyrig

hton

the

desi

gnof

the

com

mon

face

ofth

eeu

roco

ins

belo

ngs

toth

eE

urop

ean

Com

mis

sion

.Aut

hori

sed

isre

prod

uctio

nin

afo

rmat

with

out

relie

f(dr

awin

gs,p

aint

ings

,film

s)pr

ovid

edth

eyar

eno

tdet

rim

enta

lto

the

imag

eof

the

euro

.

•L

FK:

Liz

enz

Frei

eK

unst

.http://artlibre.org/licence/

lal/de

•C

FR:C

opyr

ight

free

use.

•E

PL:E

clip

sePu

blic

Lic

ense

.http://www.eclipse.org/org/

documents/epl-v10.php

Page 245: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Cop

ies

ofth

eG

PL,t

heL

GPL

asw

ell

asa

GFD

Lar

ein

clud

edin

chap

ter

Lic

ense

s68.P

leas

eno

teth

atim

ages

inth

epu

blic

dom

ain

dono

treq

uire

attr

i-bu

tion.

You

may

clic

kon

the

imag

enu

mbe

rsin

the

follo

win

gta

ble

toop

enth

ew

ebpa

geof

the

imag

esin

your

web

brow

er.

68K

apite

l13

aufS

eite

241

Page 246: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 247: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235
Page 248: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

13L

icen

ses

13.1

GN

UG

EN

ER

AL

PUB

LIC

LIC

EN

SEV

ersi

on3,

29Ju

ne20

07

Cop

yrig

ht©

2007

Free

Soft

war

eFo

unda

tion,

Inc.

<http

://fs

f.org

/>

Eve

ryon

eis

perm

itted

toco

pyan

ddi

stri

bute

verb

atim

copi

esof

this

licen

sedo

cum

ent,

but

chan

ging

itis

not

allo

wed

.Pr

eam

ble

The

GN

UG

ener

alPu

blic

Li-

cens

eis

afr

ee,c

opyl

eft

licen

sefo

rso

ftw

are

and

othe

rki

nds

ofw

orks

.

The

licen

ses

for

mos

tso

ftw

are

and

othe

rpra

ctic

alw

orks

are

de-

sign

edto

take

away

your

free

-do

mto

shar

ean

dch

ange

the

wor

ks.

By

cont

rast

,th

eG

NU

Gen

eral

Publ

icL

icen

seis

inte

n-de

dto

guar

ante

eyo

urfr

eedo

mto

shar

ean

dch

ange

all

vers

i-on

sof

apr

ogra

m–t

om

ake

su-

reit

rem

ains

free

soft

war

efo

ral

lits

user

s.W

e,th

eFr

eeSo

ft-

war

eFo

unda

tion,

use

the

GN

UG

ener

alPu

blic

Lic

ense

form

ost

ofou

rso

ftw

are;

itap

plie

sal

soto

any

othe

rw

ork

rele

ased

this

way

byits

auth

ors.

You

can

app-

lyit

toyo

urpr

ogra

ms,

too.

Whe

nw

esp

eak

offr

eeso

ftw

are,

we

are

refe

rrin

gto

free

dom

,not

pric

e.O

urG

ener

alPu

blic

Li-

cens

esar

ede

sign

edto

mak

esu

-re

that

you

have

the

free

dom

todi

stri

bute

copi

esof

free

soft

-w

are

(and

char

gefo

rth

emif

you

wis

h),t

haty

oure

ceiv

eso

ur-

ceco

deor

can

get

itif

you

wan

tit,

that

you

can

chan

geth

eso

ftw

are

orus

epi

eces

ofit

inne

wfr

eepr

ogra

ms,

and

that

you

know

you

can

doth

ese

thin

gs.

Topr

otec

tyou

rri

ghts

,we

need

topr

even

tot

hers

from

deny

ing

you

thes

eri

ghts

oras

king

you

tosu

rren

der

the

righ

ts.T

here

fo-

re,

you

have

cert

ain

resp

onsi

bi-

litie

sif

you

dist

ribu

teco

pies

ofth

eso

ftw

are,

orif

you

mod

ify

it:re

spon

sibi

litie

sto

resp

ectt

hefr

eedo

mof

othe

rs.

For

exam

ple,

ifyo

udi

stri

bute

copi

esof

such

apr

ogra

m,w

he-

ther

grat

isor

fora

fee,

you

mus

tpa

sson

toth

ere

cipi

ents

the

sam

efr

eedo

ms

that

you

rece

i-ve

d.Y

oum

ust

mak

esu

reth

at

241

Page 249: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

they

,to

o,re

ceiv

eor

can

get

the

sour

ceco

de.A

ndyo

um

ust

show

them

thes

ete

rms

soth

eykn

owth

eirr

ight

s.

Dev

elop

ers

that

use

the

GN

UG

PLpr

otec

tyo

urri

ghts

with

two

step

s:(1

)as

sert

copy

righ

ton

the

soft

war

e,an

d(2

)of

fer

you

this

Lic

ense

givi

ngyo

ule

-ga

lper

mis

sion

toco

py,d

istr

ibu-

tean

d/or

mod

ify

it.

Fort

hede

velo

pers

’and

auth

ors’

prot

ectio

n,th

eG

PLcl

earl

yex

-pl

ains

that

ther

eis

now

arra

n-ty

for

this

free

soft

war

e.Fo

rbo

thus

ers’

and

auth

ors’

sake

,th

eG

PLre

quir

esth

atm

odifi

edve

rsio

nsbe

mar

ked

asch

ange

d,so

that

thei

rpr

oble

ms

will

not

beat

trib

uted

erro

neou

sly

toau

t-ho

rsof

prev

ious

vers

ions

.

Som

ede

vice

sar

ede

sign

edto

deny

user

sac

cess

toin

stal

lor

run

mod

ified

vers

ions

ofth

eso

ftw

are

insi

deth

em,

alth

ough

the

man

ufac

ture

rcan

doso

.Thi

sis

fund

amen

tally

inco

mpa

tible

with

the

aim

ofpr

otec

ting

user

s’fr

eedo

mto

chan

geth

eso

ftw

are.

The

syst

emat

icpa

ttern

ofsu

chab

use

occu

rsin

the

area

of

prod

ucts

for

indi

vidu

als

tous

e,w

hich

ispr

ecis

ely

whe

reit

ism

ost

unac

cept

able

.T

here

fore

,w

eha

vede

sign

edth

isve

rsio

nof

the

GPL

topr

ohib

itth

epr

ac-

tice

for

thos

epr

oduc

ts.

Ifsu

chpr

oble

ms

aris

esu

bsta

ntia

llyin

othe

rdo

mai

ns,

we

stan

dre

ady

toex

tend

this

prov

isio

nto

tho-

sedo

mai

nsin

futu

reve

rsio

nsof

the

GPL

,as

need

edto

prot

ect

the

free

dom

ofus

ers.

Fina

lly,e

very

prog

ram

isth

rea-

tene

dco

nsta

ntly

byso

ftw

are

pa-

tent

s.St

ates

shou

ldno

tal

low

pate

nts

tore

stri

ctde

velo

pmen

tan

dus

eof

soft

war

eon

gene

ral-

purp

ose

com

pute

rs,

but

inth

o-se

that

do,w

ew

ish

toav

oid

the

spec

ial

dang

erth

atpa

tent

sap

-pl

ied

toa

free

prog

ram

coul

dm

ake

itef

fect

ivel

ypr

opri

etar

y.To

prev

ent

this

,th

eG

PLas

su-

res

that

pate

nts

cann

otbe

used

tore

nder

the

prog

ram

non-

free

.

The

prec

ise

term

san

dco

n-di

tions

for

copy

ing,

dist

ribu

-tio

nan

dm

odifi

catio

nfo

llow

.T

ER

MS

AN

DC

ON

DIT

ION

S0.

Defi

nitio

ns.

“Thi

sL

icen

se”

refe

rsto

vers

ion

3of

the

GN

UG

ener

alPu

blic

Li-

cens

e.

“Cop

yrig

ht”

also

mea

nsco

pyri

ght-

like

law

sth

atap

-pl

yto

othe

rki

nds

ofw

orks

,su

chas

sem

icon

duct

orm

asks

.

“The

Prog

ram

”re

fers

toan

yco

-py

righ

tabl

ew

ork

licen

sed

unde

rth

isL

icen

se.

Eac

hlic

ense

eis

addr

esse

das

“you

”.“L

icen

sees

”an

d“r

ecip

ient

s”m

aybe

indi

vi-

dual

sor

orga

niza

tions

.

To“m

odif

y”a

wor

km

eans

toco

pyfr

omor

adap

tal

lor

part

ofth

ew

ork

ina

fash

ion

requ

i-ri

ngco

pyri

ghtp

erm

issi

on,o

ther

than

the

mak

ing

ofan

exac

tco

py.T

here

sulti

ngw

ork

isca

l-le

da

“mod

ified

vers

ion”

ofth

eea

rlie

rw

ork

ora

wor

k“b

ased

on”

the

earl

ierw

ork.

A“c

over

edw

ork”

mea

nsei

ther

the

unm

odifi

edPr

ogra

mor

aw

ork

base

don

the

Prog

ram

.

To“p

ropa

gate

”a

wor

km

eans

todo

anyt

hing

with

itth

at,

wi-

thou

tpe

rmis

sion

,w

ould

mak

eyo

udi

rect

lyor

seco

ndar

ilylia

-

ble

for

infr

inge

men

tun

der

ap-

plic

able

copy

righ

tla

w,

exce

ptex

ecut

ing

iton

aco

mpu

ter

orm

odif

ying

apr

ivat

eco

py.

Pro-

paga

tion

incl

udes

copy

ing,

dis-

trib

utio

n(w

ithor

with

out

mo-

dific

atio

n),

mak

ing

avai

labl

eto

the

publ

ic,

and

inso

me

coun

-tr

ies

othe

ract

iviti

esas

wel

l.

To“c

onve

y”a

wor

km

eans

any

kind

ofpr

opag

atio

nth

aten

able

sot

her

part

ies

tom

ake

orre

cei-

veco

pies

.Mer

ein

tera

ctio

nw

itha

user

thro

ugh

aco

mpu

ter

net-

wor

k,w

ithno

tran

sfer

ofa

copy

,is

notc

onve

ying

.

An

inte

ract

ive

user

inte

rfac

edi

s-pl

ays

“App

ropr

iate

Leg

alN

oti-

ces”

toth

eex

tent

that

itin

clu-

des

aco

nven

ient

and

prom

inen

t-ly

visi

ble

feat

ure

that

(1)

dis-

play

san

appr

opri

ate

copy

righ

tno

tice,

and

(2)t

ells

the

user

that

ther

eis

now

arra

nty

fort

hew

ork

(exc

eptt

oth

eex

tent

that

war

ran-

ties

are

prov

ided

),th

atlic

ense

esm

ayco

nvey

the

wor

kun

dert

his

Lic

ense

,and

how

tovi

ewa

copy

ofth

isL

icen

se.

Ifth

ein

terf

ace

pres

ents

alis

tof

user

com

man

-ds

orop

tions

,suc

has

am

enu,

a

Page 250: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

prom

inen

tite

min

the

listm

eets

this

crite

rion

.1.S

ourc

eC

ode.

The

“sou

rce

code

”fo

ra

wor

km

eans

the

pref

erre

dfo

rmof

the

wor

kfo

rm

akin

gm

odifi

catio

nsto

it.“O

bjec

tco

de”

mea

nsan

yno

n-so

urce

form

ofa

wor

k.

A“S

tand

ard

Inte

rfac

e”m

eans

anin

terf

ace

that

eith

eris

anof

-fic

ials

tand

ard

defin

edby

are

co-

gniz

edst

anda

rds

body

,or,

inth

eca

seof

inte

rfac

essp

ecifi

edfo

ra

part

icul

arpr

ogra

mm

ing

lan-

guag

e,on

eth

atis

wid

ely

used

amon

gde

velo

pers

wor

king

inth

atla

ngua

ge.

The

“Sys

tem

Lib

rari

es”

ofan

exec

utab

lew

ork

incl

ude

any-

thin

g,ot

her

than

the

wor

kas

aw

hole

,tha

t(a)

isin

clud

edin

the

norm

alfo

rmof

pack

agin

ga

Ma-

jorC

ompo

nent

,but

whi

chis

not

part

ofth

atM

ajor

Com

pone

nt,

and

(b)

serv

eson

lyto

enab

leus

eof

the

wor

kw

ithth

atM

ajor

Com

pone

nt,

orto

impl

emen

ta

Stan

dard

Inte

rfac

efo

rw

hich

anim

plem

enta

tion

isav

aila

ble

toth

epu

blic

inso

urce

code

form

.A

“Maj

orC

ompo

nent

”,in

this

cont

ext,

mea

nsa

maj

ores

sent

i-

alco

mpo

nent

(ker

nel,

win

dow

syst

em,a

ndso

on)

ofth

esp

eci-

ficop

erat

ing

syst

em(i

fan

y)on

whi

chth

eex

ecut

able

wor

kru

ns,

ora

com

pile

rus

edto

prod

uce

the

wor

k,or

anob

ject

code

in-

terp

rete

ruse

dto

run

it.

The

“Cor

resp

ondi

ngSo

urce

”fo

ra

wor

kin

obje

ctco

defo

rmm

eans

all

the

sour

ceco

dene

e-de

dto

gene

rate

,ins

tall,

and

(for

anex

ecut

able

wor

k)ru

nth

eob

ject

code

and

tom

odif

yth

ew

ork,

incl

udin

gsc

ript

sto

con-

trol

thos

eac

tiviti

es.

How

ever

,it

does

not

incl

ude

the

wor

k’s

Syst

emL

ibra

ries

,or

gene

ral-

purp

ose

tool

sor

gene

rally

avai

labl

efr

eepr

ogra

ms

whi

char

eus

edun

mod

ified

inpe

rfor

-m

ing

thos

eac

tiviti

esbu

tw

hich

are

not

part

ofth

ew

ork.

For

exam

ple,

Cor

resp

ondi

ngSo

urce

incl

udes

inte

rfac

ede

finiti

onfil

esas

soci

ated

with

sour

cefil

esfo

rth

ew

ork,

and

the

sour

ceco

defo

rsha

red

libra

ries

and

dy-

nam

ical

lylin

ked

subp

rogr

ams

that

the

wor

kis

spec

ifica

llyde

sign

edto

requ

ire,

such

asby

intim

ate

data

com

mun

icat

ion

orco

ntro

lflo

wbe

twee

nth

ose

subp

rogr

ams

and

othe

rpa

rts

ofth

ew

ork.

The

Cor

resp

ondi

ngSo

urce

need

not

incl

ude

anyt

hing

that

user

sca

nre

gene

rate

auto

ma-

tical

lyfr

omot

her

part

sof

the

Cor

resp

ondi

ngSo

urce

.

The

Cor

resp

ondi

ngSo

urce

fora

wor

kin

sour

ceco

defo

rmis

that

sam

ew

ork.

2.B

asic

Perm

issi

-on

s.

All

righ

tsgr

ante

dun

der

this

Li-

cens

ear

egr

ante

dfo

rthe

term

ofco

pyri

ght

onth

ePr

ogra

m,

and

are

irre

voca

ble

prov

ided

the

sta-

ted

cond

ition

sar

em

et.T

his

Li-

cens

eex

plic

itly

affir

ms

your

un-

limite

dpe

rmis

sion

toru

nth

eun

mod

ified

Prog

ram

.T

heou

t-pu

tfr

omru

nnin

ga

cove

red

wor

kis

cove

red

byth

isL

icen

-se

only

ifth

eou

tput

,gi

ven

itsco

nten

t,co

nstit

utes

aco

vere

dw

ork.

Thi

sL

icen

seac

know

led-

ges

your

righ

tsof

fair

use

orot

here

quiv

alen

t,as

prov

ided

byco

pyri

ghtl

aw.

You

may

mak

e,ru

nan

dpr

opa-

gate

cove

red

wor

ksth

atyo

udo

not

conv

ey,

with

out

cond

ition

s

solo

ngas

your

licen

seot

herw

i-se

rem

ains

info

rce.

You

may

conv

eyco

vere

dw

orks

toot

hers

for

the

sole

purp

ose

ofha

ving

them

mak

em

odifi

catio

nsex

clu-

sive

lyfo

ryo

u,or

prov

ide

you

with

faci

litie

sfo

rru

nnin

gth

ose

wor

ks,

prov

ided

that

you

com

-pl

yw

ithth

ete

rms

ofth

isL

icen

-se

inco

nvey

ing

all

mat

eria

lfo

rw

hich

you

dono

tco

ntro

lco

py-

righ

t.T

hose

thus

mak

ing

orru

n-ni

ngth

eco

vere

dw

orks

for

you

mus

tdo

soex

clus

ivel

yon

your

beha

lf,u

nder

your

dire

ctio

nan

dco

ntro

l,on

term

sth

atpr

ohib

itth

emfr

omm

akin

gan

yco

pies

ofyo

urco

pyri

ghte

dm

ater

ial

outs

-id

eth

eirr

elat

ions

hip

with

you.

Con

veyi

ngun

der

any

othe

rci

rcum

stan

ces

ispe

rmitt

edso

lely

unde

rth

eco

nditi

ons

stat

edbe

low

.Su

blic

ensi

ngis

not

allo

wed

;se

ctio

n10

mak

esit

unne

cess

ary.

3.Pr

otec

ting

Use

rs’

Leg

alR

ight

sFr

omA

nti-

Cir

cum

vent

ion

Law

.

No

cove

red

wor

ksh

all

bede

-em

edpa

rtof

anef

fect

ive

tech

-no

logi

calm

easu

reun

dera

nyap

-pl

icab

lela

wfu

lfilli

ngob

ligat

i-on

sun

der

artic

le11

ofth

eW

I-

Page 251: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

POco

pyri

ghtt

reat

yad

opte

don

20D

ecem

ber

1996

,or

sim

ilar

law

spr

ohib

iting

orre

stri

ctin

gci

rcum

vent

ion

ofsu

chm

easu

-re

s.

Whe

nyo

uco

nvey

aco

ver-

edw

ork,

you

wai

vean

yle

gal

pow

erto

forb

idci

rcum

vent

ion

ofte

chno

logi

calm

easu

res

toth

eex

tent

such

circ

umve

ntio

nis

ef-

fect

edby

exer

cisi

ngri

ghts

un-

der

this

Lic

ense

with

resp

ect

toth

eco

vere

dw

ork,

and

you

disc

laim

any

inte

ntio

nto

limit

oper

atio

nor

mod

ifica

tion

ofth

ew

ork

asa

mea

nsof

enfo

rcin

g,ag

ains

tth

ew

ork’

sus

ers,

your

orth

ird

part

ies’

lega

lri

ghts

tofo

rbid

circ

umve

ntio

nof

tech

no-

logi

cal

mea

sure

s.4.

Con

veyi

ngV

erba

timC

opie

s.

You

may

conv

eyve

rbat

imco

-pi

esof

the

Prog

ram

’sso

urce

code

asyo

ure

ceiv

eit,

inan

ym

ediu

m,p

rovi

ded

that

you

con-

spic

uous

lyan

dap

prop

riat

ely

pu-

blis

hon

each

copy

anap

prop

ria-

teco

pyri

ght

notic

e;ke

epin

tact

all

notic

esst

atin

gth

atth

isL

i-ce

nse

and

any

non-

perm

issi

vete

rms

adde

din

acco

rdw

ithse

c-tio

n7

appl

yto

the

code

;kee

pin

-

tact

alln

otic

esof

the

abse

nce

ofan

yw

arra

nty;

and

give

allr

ecip

i-en

tsa

copy

ofth

isL

icen

seal

ong

with

the

Prog

ram

.

You

may

char

gean

ypr

ice

orno

pric

efo

reac

hco

pyth

atyo

uco

n-ve

y,an

dyo

um

ayof

fer

supp

ort

orw

arra

nty

prot

ectio

nfo

ra

fee.

5.C

onve

ying

Mod

ified

Sour

ceV

ersi

ons.

You

may

conv

eya

wor

kba

sed

onth

ePr

ogra

m,o

rthe

mod

ifica

-tio

nsto

prod

uce

itfr

omth

ePr

o-gr

am,i

nth

efo

rmof

sour

ceco

deun

dert

hete

rmso

fsec

tion

4,pr

o-vi

ded

that

you

also

mee

tal

lof

thes

eco

nditi

ons:

*a)

The

wor

km

ustc

arry

prom

i-ne

ntno

tices

stat

ing

that

you

mo-

difie

dit,

and

givi

nga

rele

vant

date

.*

b)T

hew

ork

mus

tca

r-ry

prom

inen

tnot

ices

stat

ing

that

itis

rele

ased

unde

rth

isL

icen

-se

and

any

cond

ition

sad

ded

un-

der

sect

ion

7.T

his

requ

irem

ent

mod

ifies

the

requ

irem

enti

nse

c-tio

n4

to“k

eep

inta

ctal

lno

ti-ce

s”.*

c)Y

oum

ust

licen

seth

een

tire

wor

k,as

aw

hole

,un

der

this

Lic

ense

toan

yone

who

co-

mes

into

poss

essi

onof

aco

py.

Thi

sL

icen

sew

illth

eref

ore

ap-

ply,

alon

gw

ithan

yap

plic

able

sect

ion

7ad

ditio

nalt

erm

s,to

the

who

leof

the

wor

k,an

dal

lits

part

s,re

gard

less

ofho

wth

eyar

epa

ckag

ed.T

hisL

icen

segi

vesn

ope

rmis

sion

tolic

ense

the

wor

kin

any

othe

rw

ay,

but

itdo

esno

tin

valid

ate

such

perm

issi

onif

you

have

sepa

rate

lyre

ceiv

edit.

*d)

Ifth

ew

ork

has

inte

rac-

tive

user

inte

rfac

es,

each

mus

tdi

spla

yA

ppro

pria

teL

egal

Not

i-ce

s;ho

wev

er,i

fthe

Prog

ram

has

inte

ract

ive

inte

rfac

esth

atdo

not

disp

lay

App

ropr

iate

Leg

alN

oti-

ces,

your

wor

kne

edno

tm

ake

them

doso

.

Aco

mpi

latio

nof

aco

vere

dw

ork

with

othe

rsep

arat

ean

din

-de

pend

entw

orks

,whi

char

eno

tby

thei

rnat

ure

exte

nsio

nsof

the

cove

red

wor

k,an

dw

hich

are

not

com

bine

dw

ithit

such

asto

form

ala

rger

prog

ram

,in

oron

avo

-lu

me

ofa

stor

age

ordi

stri

butio

nm

ediu

m,

isca

lled

an“a

ggre

ga-

te”

ifth

eco

mpi

latio

nan

dits

re-

sulti

ngco

pyri

ghta

reno

tuse

dto

limit

the

acce

ssor

lega

lrig

htso

fth

eco

mpi

latio

n’s

user

sbe

yond

wha

tth

ein

divi

dual

wor

kspe

r-m

it.In

clus

ion

ofa

cove

red

wor

k

inan

aggr

egat

edo

esno

tca

use

this

Lic

ense

toap

ply

toth

eot

her

part

sof

the

aggr

egat

e.6.

Con

-ve

ying

Non

-Sou

rce

Form

s.

You

may

conv

eya

cove

red

wor

kin

obje

ctco

defo

rmun

-de

rth

ete

rms

ofse

ctio

ns4

and

5,pr

ovid

edth

atyo

ual

soco

n-ve

yth

em

achi

ne-r

eada

ble

Cor

-re

spon

ding

Sour

ceun

der

the

term

sof

this

Lic

ense

,in

one

ofth

ese

way

s:

*a)

Con

vey

the

obje

ctco

dein

,or

embo

died

in,a

phys

ical

pro-

duct

(inc

ludi

nga

phys

ical

dist

ri-

butio

nm

ediu

m),

acco

mpa

nied

byth

eC

orre

spon

ding

Sour

cefi-

xed

ona

dura

ble

phys

ical

me-

dium

cust

omar

ilyus

edfo

rso

ft-

war

ein

terc

hang

e.*

b)C

onve

yth

eob

ject

code

in,o

rem

bodi

edin

,aph

ysic

alpr

oduc

t(in

clud

ing

aph

ysic

aldi

stri

butio

nm

ediu

m),

acco

mpa

nied

bya

wri

tten

of-

fer,

valid

for

atle

astt

hree

year

san

dva

lidfo

ras

long

asyo

uof

-fe

rsp

are

part

sor

cust

omer

sup-

port

for

that

prod

uct

mod

el,

togi

vean

yone

who

poss

esse

sth

eob

ject

code

eith

er(1

)a

copy

ofth

eC

orre

spon

ding

Sour

cefo

ral

lth

eso

ftw

are

inth

epr

oduc

t

Page 252: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

that

isco

vere

dby

this

Lic

ense

,on

adu

rabl

eph

ysic

alm

ediu

mcu

stom

arily

used

for

soft

war

ein

terc

hang

e,fo

ra

pric

eno

mo-

reth

anyo

urre

ason

able

cost

ofph

ysic

ally

perf

orm

ing

this

con-

veyi

ngof

sour

ce,

or(2

)ac

cess

toco

pyth

eC

orre

spon

ding

Sour

-ce

from

ane

twor

kse

rver

atno

char

ge.

*c)

Con

vey

indi

vidu

alco

pies

ofth

eob

ject

code

with

aco

pyof

the

wri

tten

offe

rto

pro-

vide

the

Cor

resp

ondi

ngSo

urce

.T

his

alte

rnat

ive

isal

low

edon

-ly

occa

sion

ally

and

nonc

omm

er-

cial

ly,a

ndon

lyif

you

rece

ived

the

obje

ctco

dew

ithsu

chan

of-

fer,

inac

cord

with

subs

ectio

n6b

.*d)

Con

vey

the

obje

ctco

deby

offe

ring

acce

ssfr

oma

de-

sign

ated

plac

e(g

ratis

orfo

ra

char

ge),

and

offe

requ

ival

enta

c-ce

ssto

the

Cor

resp

ondi

ngSo

ur-

cein

the

sam

ew

ayth

roug

hth

esa

me

plac

eat

nofu

rthe

rch

arge

.Y

oune

edno

tre

quir

ere

cipi

ents

toco

pyth

eC

orre

spon

ding

Sour

-ce

alon

gw

ithth

eob

ject

code

.If

the

plac

eto

copy

the

obje

ctco

deis

ane

twor

kse

rver

,th

eC

orre

spon

ding

Sour

cem

aybe

ona

diff

eren

tse

rver

(ope

rate

dby

you

ora

thir

dpa

rty)

that

sup-

port

seq

uiva

lent

copy

ing

faci

li-

ties,

prov

ided

you

mai

ntai

ncl

e-ar

dire

ctio

nsne

xtto

the

obje

ctco

desa

ying

whe

reto

find

the

Cor

resp

ondi

ngSo

urce

.R

egar

d-le

ssof

wha

tser

verh

osts

the

Cor

-re

spon

ding

Sour

ce,

you

rem

ain

oblig

ated

toen

sure

that

itis

avai

labl

efo

ras

long

asne

eded

tosa

tisfy

thes

ere

quir

emen

ts.

*e)

Con

vey

the

obje

ctco

deus

ing

peer

-to-

peer

tran

smis

sion

,pr

o-vi

ded

you

info

rmot

her

peer

sw

here

the

obje

ctco

dean

dC

orre

-sp

ondi

ngSo

urce

ofth

ew

ork

are

bein

gof

fere

dto

the

gene

ralp

u-bl

icat

noch

arge

unde

rsu

bsec

-tio

n6d

.

Ase

para

ble

port

ion

ofth

eob

-je

ctco

de,

who

seso

urce

code

isex

clud

edfr

omth

eC

orre

spon

-di

ngSo

urce

asa

Syst

emL

ibra

ry,

need

notb

ein

clud

edin

conv

ey-

ing

the

obje

ctco

dew

ork.

A“U

ser

Prod

uct”

isei

ther

(1)

a“c

onsu

mer

prod

uct”

,whi

chm

e-an

san

yta

ngib

lepe

rson

alpr

o-pe

rty

whi

chis

norm

ally

used

for

pers

onal

,fa

mily

,or

hous

ehol

dpu

rpos

es,

or(2

)an

ythi

ngde

si-

gned

orso

ldfo

rin

corp

orat

ion

into

adw

ellin

g.In

dete

rmin

ing

whe

ther

apr

oduc

tis

aco

nsum

er

prod

uct,

doub

tful

case

ssh

allb

ere

solv

edin

favo

rof

cove

rage

.Fo

ra

part

icul

arpr

oduc

tre

cei-

ved

bya

part

icul

arus

er,

“nor

-m

ally

used

”re

fers

toa

typi

cal

orco

mm

onus

eof

that

clas

sof

prod

uct,

rega

rdle

ssof

the

stat

usof

the

part

icul

arus

eror

ofth

ew

ayin

whi

chth

epa

rtic

ular

user

actu

ally

uses

,or

expe

cts

oris

expe

cted

tous

e,th

epr

oduc

t.A

prod

uct

isa

cons

umer

prod

uct

rega

rdle

ssof

whe

ther

the

pro-

duct

hass

ubst

antia

lcom

mer

cial

,in

dust

rial

orno

n-co

nsum

erus

es,

unle

sssu

chus

esre

pres

ent

the

only

sign

ifica

ntm

ode

ofus

eof

the

prod

uct.

“Ins

talla

tion

Info

rmat

ion”

for

aU

ser

Prod

uct

mea

nsan

ym

e-th

ods,

proc

edur

es,a

utho

riza

tion

keys

,oro

ther

info

rmat

ion

requ

i-re

dto

inst

alla

ndex

ecut

em

odi-

fied

vers

ions

ofa

cove

red

wor

kin

that

Use

rPr

oduc

tfr

oma

mod

ified

vers

ion

ofits

Cor

re-

spon

ding

Sour

ce.

The

info

rma-

tion

mus

tsu

ffice

toen

sure

that

the

cont

inue

dfu

nctio

ning

ofth

em

odifi

edob

ject

code

isin

noca

-se

prev

ente

dor

inte

rfer

edw

ithso

lely

beca

use

mod

ifica

tion

has

been

mad

e.

Ifyo

uco

nvey

anob

ject

code

wor

kun

der

this

sect

ion

in,

orw

ith,

orsp

ecifi

cally

for

use

in,

aU

ser

Prod

uct,

and

the

conv

ey-

ing

occu

rsas

part

ofa

tran

sac-

tion

inw

hich

the

righ

tofp

osse

s-si

onan

dus

eof

the

Use

rPro

duct

istr

ansf

erre

dto

the

reci

pien

tin

perp

etui

tyor

fora

fixed

term

(re-

gard

less

ofho

wth

etr

ansa

ctio

nis

char

acte

rize

d),t

heC

orre

spon

-di

ngSo

urce

conv

eyed

unde

rthi

sse

ctio

nm

ustb

eac

com

pani

edby

the

Inst

alla

tion

Info

rmat

ion.

But

this

requ

irem

entd

oes

nota

pply

ifne

ither

you

nora

nyth

ird

part

yre

tain

sth

eab

ility

toin

stal

lm

o-di

fied

obje

ctco

deon

the

Use

rPr

oduc

t(f

orex

ampl

e,th

ew

ork

has

been

inst

alle

din

RO

M).

The

requ

irem

ent

topr

ovid

eIn

-st

alla

tion

Info

rmat

ion

does

not

incl

ude

are

quir

emen

tto

cont

i-nu

eto

prov

ide

supp

ort

serv

ice,

war

rant

y,or

upda

tes

for

aw

ork

that

has

been

mod

ified

orin

stal

-le

dby

the

reci

pien

t,or

for

the

Use

rPr

oduc

tin

whi

chit

has

been

mod

ified

orin

stal

led.

Ac-

cess

toa

netw

ork

may

bede

nied

whe

nth

em

odifi

catio

nits

elfm

a-te

rial

lyan

dad

vers

ely

affe

ctst

heop

erat

ion

ofth

ene

twor

kor

vio-

Page 253: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

late

sth

eru

les

and

prot

ocol

sfo

rco

mm

unic

atio

nac

ross

the

net-

wor

k.

Cor

resp

ondi

ngSo

urce

conv

ey-

ed,

and

Inst

alla

tion

Info

rmat

i-on

prov

ided

,in

acco

rdw

ithth

isse

ctio

nm

ust

bein

afo

r-m

atth

atis

publ

icly

docu

men

-te

d(a

ndw

ithan

impl

emen

tatio

nav

aila

ble

toth

epu

blic

inso

urce

code

form

),an

dm

ustr

equi

reno

spec

ial

pass

wor

dor

key

for

un-

pack

ing,

read

ing

orco

pyin

g.7.

Add

ition

alTe

rms.

“Add

ition

alpe

rmis

sion

s”ar

ete

rms

that

supp

lem

entt

hete

rms

ofth

isL

icen

seby

mak

ing

exce

ptio

nsfr

omon

eor

mor

eof

itsco

nditi

ons.

Add

ition

alpe

rmis

sion

sth

atar

eap

plic

able

toth

een

tire

Prog

ram

shal

lbe

trea

ted

asth

ough

they

wer

ein

clud

edin

this

Lic

ense

,to

the

exte

ntth

atth

eyar

eva

lidun

der

appl

icab

lela

w.

Ifad

ditio

nal

perm

issi

ons

appl

yon

lyto

part

ofth

ePr

ogra

m,

that

part

may

beus

edse

para

tely

unde

rth

ose

perm

issi

ons,

but

the

entir

ePr

ogra

mre

mai

nsgo

vern

edby

this

Lic

ense

with

out

rega

rdto

the

addi

tiona

lper

mis

sion

s.

Whe

nyo

uco

nvey

aco

pyof

aco

-ve

red

wor

k,yo

um

ayat

your

op-

tion

rem

ove

any

addi

tiona

lpe

r-m

issi

onsf

rom

that

copy

,orf

rom

any

part

ofit.

(Add

ition

alpe

r-m

issi

ons

may

bew

ritte

nto

re-

quir

eth

eir

own

rem

oval

ince

r-ta

inca

ses

whe

nyo

um

odif

yth

ew

ork.

)You

may

plac

ead

ditio

nal

perm

issi

ons

onm

ater

ial,

adde

dby

you

toa

cove

red

wor

k,fo

rw

hich

you

have

orca

ngi

veap

-pr

opri

ate

copy

righ

tper

mis

sion

.

Not

with

stan

ding

any

othe

rpr

o-vi

sion

ofth

isL

icen

se,f

orm

ate-

rial

you

add

toa

cove

red

wor

k,yo

um

ay(i

fau

thor

ized

byth

eco

pyri

ghth

olde

rsof

that

mat

eri-

al)

supp

lem

entt

hete

rms

ofth

isL

icen

sew

ithte

rms:

*a)

Dis

clai

min

gw

arra

nty

orli-

miti

nglia

bilit

ydi

ffer

ently

from

the

term

sof

sect

ions

15an

d16

ofth

isL

icen

se;

or*

b)R

equi

-ri

ngpr

eser

vatio

nof

spec

ified

re-

ason

able

lega

lnot

ices

orau

thor

attr

ibut

ions

inth

atm

ater

ial

orin

the

App

ropr

iate

Leg

alN

oti-

ces

disp

laye

dby

wor

ksco

ntai

-ni

ngit;

or*

c)Pr

ohib

iting

mis

re-

pres

enta

tion

ofth

eor

igin

ofth

atm

ater

ial,

orre

quir

ing

that

mod

i-

fied

vers

ions

ofsu

chm

ater

ialb

em

arke

din

reas

onab

lew

ays

asdi

ffer

entf

rom

the

orig

inal

vers

i-on

;or

*d)

Lim

iting

the

use

for

publ

icity

purp

oses

ofna

mes

oflic

enso

rsor

auth

ors

ofth

em

ate-

rial

;or

*e)

Dec

linin

gto

gran

tri

ghts

unde

rtr

adem

ark

law

for

use

ofso

me

trad

ena

mes

,tra

de-

mar

ks,o

rse

rvic

em

arks

;or

*f)

Req

uiri

ngin

dem

nific

atio

nof

li-ce

nsor

san

dau

thor

sof

that

ma-

teri

alby

anyo

new

hoco

nvey

sth

em

ater

ial

(or

mod

ified

vers

i-on

sof

it)w

ithco

ntra

ctua

las

-su

mpt

ions

oflia

bilit

yto

the

reci

-pi

ent,

fora

nylia

bilit

yth

atth

ese

cont

ract

uala

ssum

ptio

nsdi

rect

lyim

pose

onth

ose

licen

sors

and

auth

ors.

All

othe

rno

n-pe

rmis

sive

ad-

ditio

nal

term

sar

eco

nsid

ered

“fur

ther

rest

rict

ions

”w

ithin

the

mea

ning

ofse

ctio

n10

.If

the

Prog

ram

asyo

ure

ceiv

edit,

oran

ypa

rtof

it,co

ntai

nsa

notic

est

atin

gth

atit

isgo

vern

edby

this

Lic

ense

alon

gw

itha

term

that

isa

furt

her

rest

rict

ion,

you

may

rem

ove

that

term

.If

alic

ense

docu

men

tco

ntai

nsa

furt

her

re-

stri

ctio

nbu

tper

mits

relic

ensi

ngor

conv

eyin

gun

der

this

Lic

en-

se,

you

may

add

toa

cove

red

wor

km

ater

ial

gove

rned

byth

ete

rms

ofth

atlic

ense

docu

men

t,pr

ovid

edth

atth

efu

rthe

rre

stri

c-tio

ndo

esno

tsu

rviv

esu

chre

li-ce

nsin

gor

conv

eyin

g.

Ifyo

uad

dte

rms

toa

cove

red

wor

kin

acco

rdw

ithth

isse

ctio

n,yo

um

ust

plac

e,in

the

rele

vant

sour

cefil

es,

ast

atem

ent

ofth

ead

ditio

nal

term

sth

atap

ply

toth

ose

files

,or

ano

tice

indi

ca-

ting

whe

reto

find

the

appl

icab

lete

rms.

Add

ition

alte

rms,

perm

issi

veor

non-

perm

issi

ve,

may

best

ated

inth

efo

rmof

ase

para

tely

wri

t-te

nlic

ense

,or

stat

edas

exce

pti-

ons;

the

abov

ere

quir

emen

tsap

-pl

yei

ther

way

.8.T

erm

inat

ion.

You

may

notp

ropa

gate

orm

odi-

fya

cove

red

wor

kex

cept

asex

-pr

essl

ypr

ovid

edun

der

this

Li-

cens

e.A

nyat

tem

ptot

herw

ise

topr

opag

ate

orm

odif

yit

isvo

id,

and

will

auto

mat

ical

lyte

rmin

a-te

your

righ

tsun

der

this

Lic

en-

se(i

nclu

ding

any

pate

ntlic

en-

ses

gran

ted

unde

rthe

thir

dpa

ra-

grap

hof

sect

ion

11).

Page 254: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

How

ever

,if

you

ceas

eal

lvio

la-

tion

ofth

isL

icen

se,

then

your

licen

sefr

oma

part

icul

arco

py-

righ

thol

deri

sre

inst

ated

(a)p

ro-

visi

onal

ly,

unle

ssan

dun

tilth

eco

pyri

ght

hold

erex

plic

itly

and

final

lyte

rmin

ates

your

licen

se,

and

(b)p

erm

anen

tly,i

fthe

copy

-ri

ght

hold

erfa

ilsto

notif

yyo

uof

the

viol

atio

nby

som

ere

a-so

nabl

em

eans

prio

rto

60da

ysaf

tert

hece

ssat

ion.

Mor

eove

r,yo

urlic

ense

from

apa

rtic

ular

copy

righ

thol

deri

sre

-in

stat

edpe

rman

ently

ifth

eco

py-

righ

tho

lder

notifi

esyo

uof

the

viol

atio

nby

som

ere

ason

able

mea

ns,t

his

isth

efir

sttim

eyo

uha

vere

ceiv

edno

tice

ofvi

olat

i-on

ofth

isL

icen

se(f

oran

yw

ork)

from

that

copy

righ

tho

lder

,and

you

cure

the

viol

atio

npr

ior

to30

days

afte

ryou

rrec

eipt

ofth

eno

tice.

Term

inat

ion

ofyo

urri

ghts

un-

der

this

sect

ion

does

not

term

i-na

teth

elic

ense

sof

part

ies

who

have

rece

ived

copi

esor

righ

tsfr

omyo

uun

der

this

Lic

ense

.If

your

righ

tsha

vebe

ente

rmin

a-te

dan

dno

tpe

rman

ently

rein

s-ta

ted,

you

dono

tqu

alif

yto

re-

ceiv

ene

wlic

ense

sfo

rth

esa

me

mat

eria

lund

erse

ctio

n10

.9.A

c-ce

ptan

ceN

otR

equi

red

for

Ha-

ving

Cop

ies.

You

are

not

requ

ired

toac

cept

this

Lic

ense

inor

der

tore

ceiv

eor

run

aco

pyof

the

Prog

ram

.A

ncill

ary

prop

agat

ion

ofa

co-

vere

dw

ork

occu

rrin

gso

lely

asa

cons

eque

nce

ofus

ing

peer

-to-

peer

tran

smis

sion

tore

ceiv

ea

copy

likew

ise

does

not

requ

ire

acce

ptan

ce.

How

ever

,no

thin

got

her

than

this

Lic

ense

gran

tsyo

upe

rmis

sion

topr

opag

ate

orm

odif

yan

yco

vere

dw

ork.

The

-se

actio

nsin

frin

geco

pyri

ght

ifyo

udo

not

acce

ptth

isL

icen

se.

The

refo

re,b

ym

odif

ying

orpr

o-pa

gatin

ga

cove

red

wor

k,yo

uin

-di

cate

your

acce

ptan

ceof

this

Lic

ense

todo

so.1

0.A

utom

atic

Lic

ensi

ngof

Dow

nstr

eam

Rec

i-pi

ents

.

Eac

htim

eyo

uco

nvey

aco

ver-

edw

ork,

the

reci

pien

taut

omat

i-ca

llyre

ceiv

esa

licen

sefr

omth

eor

igin

allic

enso

rs,t

oru

n,m

odi-

fyan

dpr

opag

ate

that

wor

k,su

b-je

ctto

this

Lic

ense

.You

are

not

resp

onsi

ble

for

enfo

rcin

gco

mp-

lianc

eby

thir

dpa

rtie

sw

ithth

isL

icen

se.

An

“ent

itytr

ansa

ctio

n”is

atr

an-

sact

ion

tran

sfer

ring

cont

rol

ofan

orga

niza

tion,

orsu

bsta

ntia

l-ly

all

asse

tsof

one,

orsu

bdi-

vidi

ngan

orga

niza

tion,

orm

er-

ging

orga

niza

tions

.If

prop

aga-

tion

ofa

cove

red

wor

kre

sults

from

anen

tity

tran

sact

ion,

each

part

yto

that

tran

sact

ion

who

re-

ceiv

esa

copy

ofth

ew

ork

also

rece

ives

wha

teve

rlic

ense

sto

the

wor

kth

epa

rty’

spr

edec

esso

rin

inte

rest

had

orco

uld

give

unde

rth

epr

evio

uspa

ragr

aph,

plus

ari

ght

topo

sses

sion

ofth

eC

or-

resp

ondi

ngSo

urce

ofth

ew

ork

from

the

pred

eces

sori

nin

tere

st,

ifth

epr

edec

esso

rha

sit

orca

nge

titw

ithre

ason

able

effo

rts.

You

may

not

impo

sean

yfu

r-th

erre

stri

ctio

nson

the

exer

cise

ofth

eri

ghts

gran

ted

oraf

firm

edun

der

this

Lic

ense

.Fo

rex

amp-

le,y

oum

ayno

tim

pose

alic

en-

sefe

e,ro

yalty

,or

othe

rch

arge

fore

xerc

ise

ofri

ghts

gran

ted

un-

der

this

Lic

ense

,an

dyo

um

ayno

tin

itiat

elit

igat

ion

(inc

ludi

nga

cros

s-cl

aim

orco

unte

rcla

imin

ala

wsu

it)al

legi

ngth

atan

ypa

-

tent

clai

mis

infr

inge

dby

ma-

king

,usi

ng,s

ellin

g,of

feri

ngfo

rsa

le,

orim

port

ing

the

Prog

ram

oran

ypo

rtio

nof

it.11

.Pat

ents

.

A“c

ontr

ibut

or”

isa

copy

righ

tho

lder

who

auth

oriz

esus

eun

der

this

Lic

ense

ofth

ePr

ogra

mor

aw

ork

onw

hich

the

Prog

ram

isba

sed.

The

wor

kth

uslic

ense

dis

calle

dth

eco

ntri

buto

r’s

“con

tri-

buto

rver

sion

”.

Aco

ntri

buto

r’s

“ess

entia

lpat

ent

clai

ms”

are

allp

aten

tcla

ims

ow-

ned

orco

ntro

lled

byth

eco

nt-

ribu

tor,

whe

ther

alre

ady

acqu

i-re

dor

here

afte

rac

quir

ed,

that

wou

ldbe

infr

inge

dby

som

em

anne

r,pe

rmitt

edby

this

Lic

en-

se,o

fm

akin

g,us

ing,

orse

lling

itsco

ntri

buto

rve

rsio

n,bu

tdo

not

incl

ude

clai

ms

that

wou

ldbe

infr

inge

don

lyas

aco

nse-

quen

ceof

furt

her

mod

ifica

tion

ofth

eco

ntri

buto

rve

rsio

n.Fo

rpu

rpos

esof

this

defin

ition

,“co

n-tr

ol”

incl

udes

the

righ

tto

gran

tpa

tent

subl

icen

ses

ina

man

ner

cons

iste

ntw

ithth

ere

quir

emen

tsof

this

Lic

ense

.

Eac

hco

ntri

buto

rgr

ants

you

ano

n-ex

clus

ive,

wor

ldw

ide,

Page 255: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

roya

lty-f

ree

pate

ntlic

ense

un-

der

the

cont

ribu

tor’

ses

sent

ial

pate

ntcl

aim

s,to

mak

e,us

e,se

ll,of

fer

for

sale

,im

port

and

othe

r-w

ise

run,

mod

ify

and

prop

agat

eth

eco

nten

tsof

itsco

ntri

buto

rve

rsio

n.

Inth

efo

llow

ing

thre

epa

ra-

grap

hs,

a“p

aten

tlic

ense

”is

any

expr

ess

agre

emen

tor

com

-m

itmen

t,ho

wev

erde

nom

inat

ed,

nott

oen

forc

ea

pate

nt(s

uch

asan

expr

ess

perm

issi

onto

prac

-tic

ea

pate

ntor

cove

nant

not

tosu

efo

rpa

tent

infr

inge

men

t).T

o“g

rant

”su

cha

pate

ntlic

ense

toa

part

ym

eans

tom

ake

such

anag

reem

ent

orco

mm

itmen

tno

tto

enfo

rce

apa

tent

agai

nst

the

part

y.

Ifyo

uco

nvey

aco

vere

dw

ork,

know

ingl

yre

lyin

gon

apa

tent

licen

se,

and

the

Cor

resp

ondi

ngSo

urce

ofth

ew

ork

isno

tava

il-ab

lefo

ran

yone

toco

py,

free

ofch

arge

and

unde

rth

ete

rms

ofth

isL

icen

se,

thro

ugh

apu

-bl

icly

avai

labl

ene

twor

kse

rver

orot

her

read

ilyac

cess

ible

me-

ans,

then

you

mus

tei

ther

(1)

caus

eth

eC

orre

spon

ding

Sour

-ce

tobe

soav

aila

ble,

or(2

)ar

-

rang

eto

depr

ive

your

self

ofth

ebe

nefit

ofth

epa

tent

licen

sefo

rth

ispa

rtic

ular

wor

k,or

(3)a

rran

-ge

,in

am

anne

rco

nsis

tent

with

the

requ

irem

ents

ofth

isL

icen

-se

,to

exte

ndth

epa

tent

licen

seto

dow

nstr

eam

reci

pien

ts.“

Kno

-w

ingl

yre

lyin

g”m

eans

you

ha-

veac

tual

know

ledg

eth

at,b

utfo

rth

epa

tent

licen

se,y

our

conv

ey-

ing

the

cove

red

wor

kin

aco

un-

try,

oryo

urre

cipi

ent’s

use

ofth

eco

vere

dw

ork

ina

coun

try,

wou

ldin

frin

geon

eor

mor

eid

en-

tifiab

lepa

tent

sin

that

coun

try

that

you

have

reas

onto

belie

vear

eva

lid.

If,p

ursu

ant

toor

inco

nnec

tion

with

asi

ngle

tran

sact

ion

orar

-ra

ngem

ent,

you

conv

ey,

orpr

o-pa

gate

bypr

ocur

ing

conv

eyan

ceof

,aco

vere

dw

ork,

and

gran

tapa

tent

licen

seto

som

eof

the

par-

ties

rece

ivin

gth

eco

vere

dw

ork

auth

oriz

ing

them

tous

e,pr

opa-

gate

,m

odif

yor

conv

eya

spe-

cific

copy

ofth

eco

vere

dw

ork,

then

the

pate

ntlic

ense

you

gran

tis

auto

mat

ical

lyex

tend

edto

all

reci

pien

tsof

the

cove

red

wor

kan

dw

orks

base

don

it.

Apa

tent

licen

seis

“dis

crim

ina-

tory

”if

itdo

esno

tin

clud

ew

i-th

inth

esc

ope

ofits

cove

rage

,pr

ohib

itsth

eex

erci

seof

,or

isco

nditi

oned

onth

eno

n-ex

erci

seof

one

orm

ore

ofth

eri

ghts

that

are

spec

ifica

llygr

ante

dun

der

this

Lic

ense

.Y

oum

ayno

tco

n-ve

ya

cove

red

wor

kif

you

are

apa

rty

toan

arra

ngem

ent

with

ath

ird

part

yth

atis

inth

ebu

sine

ssof

dist

ribu

ting

soft

war

e,un

der

whi

chyo

um

ake

paym

entt

oth

eth

ird

part

yba

sed

onth

eex

tent

ofyo

urac

tivity

ofco

nvey

ing

the

wor

k,an

dun

derw

hich

the

thir

dpa

rty

gran

ts,

toan

yof

the

par-

ties

who

wou

ldre

ceiv

eth

eco

-ve

red

wor

kfr

omyo

u,a

disc

rim

i-na

tory

pate

ntlic

ense

(a)

inco

n-ne

ctio

nw

ithco

pies

ofth

eco

-ve

red

wor

kco

nvey

edby

you

(or

copi

esm

ade

from

thos

eco

pies

),or

(b)

prim

arily

for

and

inco

n-ne

ctio

nw

ithsp

ecifi

cpr

oduc

tsor

com

pila

tions

that

cont

ain

the

co-

vere

dw

ork,

unle

ssyo

uen

tere

din

toth

atar

rang

emen

t,or

that

pa-

tent

licen

sew

asgr

ante

d,pr

iort

o28

Mar

ch20

07.

Not

hing

inth

isL

icen

sesh

all

beco

nstr

ued

asex

clud

ing

orli-

miti

ngan

yim

plie

dlic

ense

or

othe

rde

fens

esto

infr

inge

men

tth

atm

ayot

herw

ise

beav

aila

ble

toyo

uun

der

appl

icab

lepa

tent

law

.12.

No

Surr

ende

rofO

ther

s’Fr

eedo

m.

Ifco

nditi

ons

are

impo

sed

onyo

u(w

heth

erby

cour

tor

der,

agre

emen

tor

othe

rwis

e)th

atco

ntra

dict

the

cond

ition

sof

this

Lic

ense

,the

ydo

note

xcus

eyo

ufr

omth

eco

nditi

ons

ofth

isL

i-ce

nse.

Ifyo

uca

nnot

conv

eya

cove

red

wor

kso

asto

satis

fysi

mul

tane

ousl

yyo

urob

ligat

ions

unde

rthi

sLic

ense

and

any

othe

rpe

rtin

ent

oblig

atio

ns,

then

asa

cons

eque

nce

you

may

not

con-

vey

itat

all.

For

exam

ple,

ifyo

uag

ree

tote

rms

that

oblig

a-te

you

toco

llect

aro

yalty

for

furt

her

conv

eyin

gfr

omth

ose

tow

hom

you

conv

eyth

ePr

ogra

m,

the

only

way

you

coul

dsa

tisfy

both

thos

ete

rms

and

this

Lic

en-

sew

ould

beto

refr

ain

entir

ely

from

conv

eyin

gth

ePr

ogra

m.1

3.U

sew

ithth

eG

NU

Aff

ero

Gen

e-ra

lPub

licL

icen

se.

Not

with

stan

ding

any

othe

rpr

o-vi

sion

ofth

isL

icen

se,

you

ha-

vepe

rmis

sion

tolin

kor

com

-bi

nean

yco

vere

dw

ork

with

a

Page 256: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

wor

klic

ense

dun

der

vers

ion

3of

the

GN

UA

ffer

oG

ener

alPu

-bl

icL

icen

sein

toa

sing

leco

mbi

-ne

dw

ork,

and

toco

nvey

the

re-

sulti

ngw

ork.

The

term

sof

this

Lic

ense

will

cont

inue

toap

ply

toth

epa

rtw

hich

isth

eco

ver-

edw

ork,

but

the

spec

ial

requ

i-re

men

tsof

the

GN

UA

ffer

oG

e-ne

ralP

ublic

Lic

ense

,sec

tion

13,

conc

erni

ngin

tera

ctio

nth

roug

ha

netw

ork

will

appl

yto

the

com

-bi

natio

nas

such

.14

.R

evis

edV

ersi

ons

ofth

isL

icen

se.

The

Free

Soft

war

eFo

unda

tion

may

publ

ish

revi

sed

and/

orne

wve

rsio

nsof

the

GN

UG

ener

alPu

blic

Lic

ense

from

time

totim

e.Su

chne

wve

rsio

nsw

illbe

sim

ilar

insp

irit

toth

epr

esen

tve

rsio

n,bu

tmay

diff

erin

deta

ilto

addr

ess

new

prob

lem

sor

con-

cern

s.

Eac

hve

rsio

nis

give

na

dist

in-

guis

hing

vers

ion

num

ber.

Ifth

ePr

ogra

msp

ecifi

esth

ata

cert

ain

num

bere

dve

rsio

nof

the

GN

UG

ener

alPu

blic

Lic

ense

“or

any

late

rve

rsio

n”ap

plie

sto

it,yo

uha

veth

eop

tion

offo

llow

ing

the

term

san

dco

nditi

ons

eith

erof

that

num

bere

dve

rsio

nor

ofan

y

late

rve

rsio

npu

blis

hed

byth

eFr

eeSo

ftw

are

Foun

datio

n.If

the

Prog

ram

does

not

spec

ify

ave

rsio

nnu

mbe

roft

heG

NU

Ge-

nera

lPu

blic

Lic

ense

,yo

um

aych

oose

any

vers

ion

ever

publ

is-

hed

byth

eFr

eeSo

ftw

are

Foun

-da

tion.

Ifth

ePr

ogra

msp

ecifi

esth

ata

prox

yca

nde

cide

whi

chfu

ture

vers

ions

ofth

eG

NU

Gen

eral

Publ

icL

icen

seca

nbe

used

,tha

tpr

oxy’

spu

blic

stat

emen

tof

ac-

cept

ance

ofa

vers

ion

perm

an-

ently

auth

oriz

esyo

uto

choo

seth

atve

rsio

nfo

rthe

Prog

ram

.

Lat

erlic

ense

vers

ions

may

give

you

addi

tiona

lor

diff

eren

tpe

r-m

issi

ons.

How

ever

,no

addi

tio-

nal

oblig

atio

nsar

eim

pose

don

any

auth

oror

copy

righ

tho

lder

asa

resu

ltof

your

choo

sing

tofo

llow

ala

ter

vers

ion.

15.

Dis

-cl

aim

erof

War

rant

y.

TH

ER

EIS

NO

WA

RR

AN

TY

FOR

TH

EPR

OG

RA

M,

TOT

HE

EX

TE

NT

PER

MIT

TE

DB

YA

PPL

ICA

BL

EL

AW

.E

X-

CE

PTW

HE

NO

TH

ER

WIS

EST

AT

ED

INW

RIT

ING

TH

EC

OPY

RIG

HT

HO

LD

ER

S

AN

D/O

RO

TH

ER

PAR

TIE

SPR

OV

IDE

TH

EPR

OG

RA

M“A

SIS

”W

ITH

OU

TW

AR

-R

AN

TY

OF

AN

YK

IND

,E

ITH

ER

EX

PRE

SSE

DO

RIM

PLIE

D,

INC

LU

DIN

G,

BU

TN

OT

LIM

ITE

DTO

,T

HE

IMPL

IED

WA

RR

AN

TIE

SO

FM

ER

CH

AN

TAB

ILIT

YA

ND

FIT

NE

SSFO

RA

PAR

-T

ICU

LA

RPU

RPO

SE.

TH

EE

NT

IRE

RIS

KA

STO

TH

EQ

UA

LIT

YA

ND

PER

FOR

-M

AN

CE

OF

TH

EPR

OG

RA

MIS

WIT

HY

OU

.SH

OU

LD

TH

EPR

OG

RA

MPR

OV

ED

EFE

C-

TIV

E,

YO

UA

SSU

ME

TH

EC

OST

OF

AL

LN

EC

ESS

ARY

SERV

ICIN

G,

RE

PAIR

OR

CO

RR

EC

TIO

N.1

6.L

imita

tion

ofL

iabi

lity.

INN

OE

VE

NT

UN

LE

SSR

EQ

UIR

ED

BY

APP

LIC

A-

BL

EL

AW

OR

AG

RE

ED

TOIN

WR

ITIN

GW

ILL

AN

YC

OPY

RIG

HT

HO

LD

ER

,O

RA

NY

OT

HE

RPA

RT

YW

HO

MO

DIF

IES

AN

D/O

RC

ON

VE

YS

TH

EPR

OG

RA

MA

SPE

RM

ITT

ED

AB

OV

E,

BE

LIA

BL

ETO

YO

UFO

RD

AM

AG

ES,

INC

LU

DIN

GA

NY

GE

NE

RA

L,

SPE

CIA

L,

INC

IDE

NTA

LO

RC

ON

-SE

QU

EN

TIA

LD

AM

AG

ES

AR

ISIN

GO

UT

OF

TH

EU

SEO

RIN

AB

ILIT

YTO

USE

TH

EPR

OG

RA

M(I

NC

LU

DIN

GB

UT

NO

TL

IMIT

ED

TOL

OSS

OF

DA

TAO

RD

ATA

BE

ING

RE

ND

ER

ED

INA

CC

UR

AT

EO

RL

OSS

ES

SUST

AIN

ED

BY

YO

UO

RT

HIR

DPA

RT

IES

OR

AFA

ILU

RE

OF

TH

EPR

O-

GR

AM

TOO

PER

AT

EW

ITH

AN

YO

TH

ER

PRO

GR

AM

S),

EV

EN

IFSU

CH

HO

LD

ER

OR

OT

HE

RPA

RT

YH

AS

BE

EN

AD

VIS

ED

OF

TH

EPO

SSIB

I-L

ITY

OF

SUC

HD

AM

AG

ES.

17.I

nter

pret

atio

nof

Sect

ions

15an

d16

.

Ifth

edi

scla

imer

ofw

arra

nty

and

limita

tion

oflia

bilit

ypr

ovi-

ded

abov

eca

nnot

begi

ven

loca

lle

gal

effe

ctac

cord

ing

toth

eir

term

s,re

view

ing

cour

tssh

alla

p-pl

ylo

cal

law

that

mos

tcl

ose-

lyap

prox

imat

esan

abso

lute

wai

-ve

rof

all

civi

llia

bilit

yin

con-

nect

ion

with

the

Prog

ram

,un

-le

ssa

war

rant

yor

assu

mpt

ion

oflia

bilit

yac

com

pani

esa

copy

ofth

ePr

ogra

min

retu

rnfo

rafe

e.

Page 257: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

EN

DO

FT

ER

MS

AN

DC

ON

-D

ITIO

NS

How

toA

pply

The

seTe

rms

toY

ourN

ewPr

ogra

ms

Ifyo

ude

velo

pa

new

prog

ram

,an

dyo

uw

ant

itto

beof

the

grea

test

poss

ible

use

toth

epu

-bl

ic,

the

best

way

toac

hiev

eth

isis

tom

ake

itfr

eeso

ftw

are

whi

chev

eryo

neca

nre

dist

ribu

tean

dch

ange

unde

rthe

sete

rms.

Todo

so,

atta

chth

efo

llow

ing

notic

esto

the

prog

ram

.It

issa

fest

toat

tach

them

toth

est

art

ofea

chso

urce

file

tom

oste

ffec

-tiv

ely

stat

eth

eex

clus

ion

ofw

ar-

rant

y;an

dea

chfil

esh

ould

have

atle

astt

he“c

opyr

ight

”lin

ean

da

poin

tert

ow

here

the

full

notic

eis

foun

d.

<one

line

togi

veth

epr

ogra

m’s

nam

ean

da

brie

fid

eaof

wha

tit

does

.>C

opyr

ight

(C)

<yea

r><n

ame

ofau

thor

>

Thi

spr

ogra

mis

free

soft

war

e:yo

uca

nre

dist

ribu

teit

and/

orm

odif

yit

unde

rthe

term

sof

the

GN

UG

ener

alPu

blic

Lic

ense

aspu

blis

hed

byth

eFr

eeSo

ftw

are

Foun

datio

n,ei

ther

vers

ion

3of

the

Lic

ense

,or

(at

your

optio

n)an

yla

terv

ersi

on.

Thi

spr

ogra

mis

dist

ribu

ted

inth

eho

peth

atit

will

beus

e-fu

l,bu

tWIT

HO

UT

AN

YW

AR

-R

AN

TY

;w

ithou

tev

enth

eim

-pl

ied

war

rant

yof

ME

RC

HA

N-

TAB

ILIT

Yor

FIT

NE

SSFO

RA

PAR

TIC

UL

AR

PUR

POSE

.See

the

GN

UG

ener

alPu

blic

Lic

en-

sefo

rmor

ede

tails

.

You

shou

ldha

vere

ceiv

eda

copy

ofth

eG

NU

Gen

eral

Publ

icL

icen

seal

ong

with

this

prog

ram

.If

not,

see

<http

://w

ww

.gnu

.org

/lice

nses

/>.

Als

oad

din

form

atio

non

how

toco

ntac

tyo

uby

elec

tron

ican

dpa

perm

ail.

Ifth

epr

ogra

mdo

este

rmin

alin

-te

ract

ion,

mak

eit

outp

uta

shor

tno

tice

like

this

whe

nit

star

tsin

anin

tera

ctiv

em

ode:

<pro

gram

>C

opyr

ight

(C)

<yea

r><n

ame

ofau

thor

>T

his

prog

ram

com

esw

ithA

BSO

-L

UT

ELY

NO

WA

RR

AN

TY

;fo

rde

tails

type

‘sho

ww

’.T

his

isfr

eeso

ftw

are,

and

you

are

wel

com

eto

redi

stri

bute

itun

der

cert

ain

cond

ition

s;ty

pe‘s

how

c’fo

rdet

ails

.

The

hypo

thet

ical

com

man

ds‘s

how

w’

and

‘sho

wc’

shou

ldsh

owth

eap

prop

riat

epa

rts

ofth

eG

ener

alPu

blic

Lic

ense

.O

fco

urse

,yo

urpr

ogra

m’s

com

-m

ands

mig

htbe

diff

eren

t;fo

ra

GU

Iin

terf

ace,

you

wou

ldus

ean

“abo

utbo

x”.

You

shou

ldal

soge

tyo

urem

-pl

oyer

(if

you

wor

kas

apr

o-gr

amm

er)

orsc

hool

,if

any,

tosi

gna

“cop

yrig

htdi

scla

i-m

er”

for

the

prog

ram

,if

ne-

cess

ary.

For

mor

ein

form

ati-

onon

this

,an

dho

wto

appl

yan

dfo

llow

the

GN

UG

PL,

see

<http

://w

ww

.gnu

.org

/lice

nses

/>.

The

GN

UG

ener

alPu

blic

Lic

en-

sedo

esno

tper

mit

inco

rpor

atin

gyo

urpr

ogra

min

topr

opri

etar

ypr

ogra

ms.

Ifyo

urpr

ogra

mis

asu

brou

tine

libra

ry,

you

may

cons

ider

itm

ore

usef

ulto

perm

itlin

king

prop

riet

ary

appl

icat

ions

with

the

libra

ry.

Ifth

isis

wha

tyo

uw

ant

todo

,us

eth

eG

NU

Les

ser

Gen

eral

Publ

icL

icen

sein

stea

dof

this

Lic

ense

.B

utfir

st,

plea

sere

ad<h

ttp://

ww

w.g

nu.o

rg/p

hilo

soph

y/w

hy-

not-

lgpl

.htm

l>.

13.2

GN

UFr

eeD

ocum

enta

tion

Lic

ense

Page 258: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

Ver

sion

1.3,

3N

ovem

ber2

008

Cop

yrig

ht©

2000

,200

1,20

02,

2007

,200

8Fr

eeSo

ftw

are

Foun

-da

tion,

Inc.

<http

://fs

f.org

/>

Eve

ryon

eis

perm

itted

toco

pyan

ddi

stri

bute

verb

atim

copi

esof

this

licen

sedo

cum

ent,

but

chan

ging

itis

not

allo

wed

.0.

PRE

AM

BL

E

The

purp

ose

ofth

isL

icen

seis

tom

ake

am

anua

l,te

xtbo

ok,o

rot

her

func

tiona

lan

dus

eful

do-

cum

ent"

free

ïnth

ese

nse

offr

ee-

dom

:to

assu

reev

eryo

neth

eef

-fe

ctiv

efr

eedo

mto

copy

and

re-

dist

ribu

teit,

with

orw

ithou

tmo-

dify

ing

it,ei

ther

com

mer

cial

lyor

nonc

omm

erci

ally

.Sec

onda

ri-

ly,t

his

Lic

ense

pres

erve

sfo

rthe

auth

oran

dpu

blis

her

aw

ayto

get

cred

itfo

rth

eir

wor

k,w

hi-

leno

tbe

ing

cons

ider

edre

spon

-si

ble

for

mod

ifica

tions

mad

eby

othe

rs.

Thi

sL

icen

seis

aki

ndof

"cop

y-le

ft",

whi

chm

eans

that

deriv

ati-

vew

orks

ofth

edo

cum

entm

ust

them

selv

esbe

free

inth

esa

me

sens

e.It

com

plem

ents

the

GN

UG

ener

alPu

blic

Lic

ense

,w

hich

isa

copy

left

licen

sede

sign

edfo

rfre

eso

ftw

are.

We

have

desi

gned

this

Lic

ense

inor

der

tous

eit

for

man

uals

for

free

soft

war

e,be

caus

efr

eeso

ftw

are

need

sfr

eedo

cum

en-

tatio

n:a

free

prog

ram

shou

ldco

me

with

man

uals

prov

idin

gth

esa

me

free

dom

sth

atth

eso

ft-

war

edo

es.

But

this

Lic

ense

isno

tlim

ited

toso

ftw

are

man

u-al

s;it

can

beus

edfo

ran

yte

xtu-

alw

ork,

rega

rdle

ssof

subj

ect

mat

ter

orw

heth

erit

ispu

blis

-he

das

apr

inte

dbo

ok.

We

re-

com

men

dth

isL

icen

sepr

inci

pal-

lyfo

rw

orks

who

sepu

rpos

eis

inst

ruct

ion

orre

fere

nce.

1.A

PP-

LIC

AB

ILIT

YA

ND

DE

FIN

ITI-

ON

S

Thi

sL

icen

seap

plie

sto

any

ma-

nual

orot

her

wor

k,in

any

me-

dium

,tha

tcon

tain

sa

notic

epl

a-ce

dby

the

copy

righ

thol

ders

ay-

ing

itca

nbe

dist

ribu

ted

un-

der

the

term

sof

this

Lic

ense

.Su

cha

notic

egr

ants

aw

orld

-w

ide,

roya

lty-f

ree

licen

se,

unli-

mite

din

dura

tion,

tous

eth

atw

ork

unde

rth

eco

nditi

ons

sta-

ted

here

in.T

he"D

ocum

ent"

,be-

low

,re

fers

toan

ysu

chm

anua

l

orw

ork.

Any

mem

bero

fthe

pu-

blic

isa

licen

see,

and

isad

dres

-se

das

"you

".Y

ouac

cept

the

li-ce

nse

ifyo

uco

py,m

odif

yor

dis-

trib

ute

the

wor

kin

aw

ayre

qui-

ring

perm

issi

onun

derc

opyr

ight

law

.

A"M

odifi

edV

ersi

onöf

the

Do-

cum

entm

eans

any

wor

kco

ntai

-ni

ngth

eD

ocum

ento

ra

port

ion

ofit,

eith

erco

pied

verb

atim

,or

with

mod

ifica

tions

and/

ortr

ans-

late

din

toan

othe

rlan

guag

e.

ASS

econ

dary

Sect

ionï

sa

na-

med

appe

ndix

ora

fron

t-m

atte

rse

ctio

nof

the

Doc

umen

tth

atde

als

excl

usiv

ely

with

the

rela

ti-on

ship

ofth

epu

blis

hers

orau

t-ho

rsof

the

Doc

umen

tto

the

Doc

umen

t’sov

eral

lsu

bjec

t(o

rto

rela

ted

mat

ters

)an

dco

nta-

ins

noth

ing

that

coul

dfa

lldi

-re

ctly

with

inth

atov

eral

lsub

ject

.(T

hus,

ifth

eD

ocum

ent

isin

part

ate

xtbo

okof

mat

hem

atic

s,a

Seco

ndar

ySe

ctio

nm

ayno

tex

plai

nan

ym

athe

mat

ics.

)T

here

latio

nshi

pco

uld

bea

mat

ter

ofhi

stor

ical

conn

ectio

nw

ithth

esu

bjec

tor

with

rela

ted

mat

ters

,or

ofle

gal,

com

mer

cial

,phi

loso

-

phic

al,e

thic

alor

polit

ical

posi

ti-on

rega

rdin

gth

em.

The

Ïnva

rian

tSe

ctio

nsär

ece

r-ta

inSe

cond

ary

Sect

ions

who

setit

les

are

desi

gnat

ed,

asbe

ing

thos

eof

Inva

rian

tSe

ctio

ns,

inth

eno

tice

that

says

that

the

Do-

cum

enti

sre

leas

edun

dert

his

Li-

cens

e.If

ase

ctio

ndo

esno

tfit

the

abov

ede

finiti

onof

Seco

nda-

ryth

enit

isno

tal

low

edto

bede

sign

ated

asIn

vari

ant.

The

Do-

cum

ent

may

cont

ain

zero

Inva

-ri

antS

ectio

ns.I

fth

eD

ocum

ent

does

not

iden

tify

any

Inva

rian

tSe

ctio

nsth

enth

ere

are

none

.

The

"Cov

erTe

xtsä

rece

rtai

nsh

ort

pass

ages

ofte

xtth

atar

elis

ted,

asFr

ont-

Cov

erTe

xts

orB

ack-

Cov

erTe

xts,

inth

eno

ti-ce

that

says

that

the

Doc

umen

tis

rele

ased

unde

rth

isL

icen

se.

AFr

ont-

Cov

erTe

xtm

aybe

atm

ost5

wor

ds,a

nda

Bac

k-C

over

Text

may

beat

mos

t25

wor

ds.

A"T

rans

pare

nt"c

opy

ofth

eD

ocum

ent

mea

nsa

mac

hine

-re

adab

leco

py,

repr

esen

ted

ina

form

atw

hose

spec

ifica

tion

isav

aila

ble

toth

ege

nera

lpu

-bl

ic,t

hati

ssu

itabl

efo

rre

visi

ng

Page 259: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

the

docu

men

tst

raig

htfo

rwar

d-ly

with

gene

ric

text

edito

rsor

(for

imag

esco

mpo

sed

ofpi

xels

)ge

neri

cpa

int

prog

ram

sor

(for

draw

ings

)so

me

wid

ely

avai

l-ab

ledr

awin

ged

itor,

and

that

issu

itabl

efo

rin

putt

ote

xtfo

rmat

-te

rsor

for

auto

mat

ictr

ansl

ati-

onto

ava

riet

yof

form

ats

sui-

tabl

efo

rin

put

tote

xtfo

rmat

-te

rs.A

copy

mad

ein

anot

herw

i-se

Tran

spar

ent

file

form

atw

ho-

sem

arku

p,or

abse

nce

ofm

ark-

up,h

asbe

enar

rang

edto

thw

art

ordi

scou

rage

subs

eque

ntm

odi-

ficat

ion

byre

ader

sis

notT

rans

-pa

rent

.A

nim

age

form

atis

not

Tran

spar

enti

fus

edfo

ran

ysu

b-st

antia

lam

ount

ofte

xt.A

copy

that

isno

t"Tr

ansp

aren

tïsca

lled

Öpa

que"

.

Exa

mpl

esof

suita

ble

form

ats

for

Tran

spar

ent

copi

esin

clud

epl

ain

ASC

IIw

ithou

tm

arku

p,Te

xinf

oin

put

form

at,

LaT

eXin

put

form

at,

SGM

Lor

XM

Lus

ing

apu

blic

lyav

aila

ble

DT

D,

and

stan

dard

-con

form

ing

sim

-pl

eH

TM

L,

Post

Scri

ptor

PDF

desi

gned

for

hum

anm

odifi

ca-

tion.

Exa

mpl

esof

tran

spar

ent

imag

efo

rmat

sin

clud

ePN

G,

XC

Fan

dJP

G.O

paqu

efo

rmat

s

incl

ude

prop

riet

ary

form

ats

that

can

bere

adan

ded

ited

only

bypr

opri

etar

yw

ord

proc

esso

rs,

SGM

Lor

XM

Lfo

rw

hich

the

DT

Dan

d/or

proc

essi

ngto

ols

are

not

gene

rally

avai

labl

e,an

dth

em

achi

ne-g

ener

ated

HT

ML

,Po

stSc

ript

orPD

Fpr

oduc

edby

som

ew

ord

proc

esso

rsfo

rou

t-pu

tpur

pose

son

ly.

The

"Titl

ePa

ge"m

eans

,fo

ra

prin

ted

book

,th

etit

lepa

geits

-el

f,pl

ussu

chfo

llow

ing

page

sas

are

need

edto

hold

,le

gibl

y,th

em

ater

ial

this

Lic

ense

requ

i-re

sto

appe

arin

the

title

page

.Fo

rw

orks

info

rmat

sw

hich

dono

tha

vean

ytit

lepa

geas

such

,"T

itle

Page

"mea

nsth

ete

xtne

-ar

the

mos

tpro

min

enta

ppea

ran-

ceof

the

wor

k’s

title

,pre

cedi

ngth

ebe

ginn

ing

ofth

ebo

dyof

the

text

.

The

"pub

lishe

r"m

eans

any

per-

son

oren

tity

that

dist

ribu

tes

co-

pies

ofth

eD

ocum

entt

oth

epu

-bl

ic.

Ase

ctio

ntitl

edX

YZ

"mea

nsa

nam

edsu

buni

tof

the

Doc

u-m

ent

who

setit

leei

ther

ispr

e-ci

sely

XY

Zor

cont

ains

XY

Zin

pare

nthe

ses

follo

win

gte

xtth

attr

ansl

ates

XY

Zin

anot

her

lan-

guag

e.(H

ere

XY

Zst

ands

for

asp

ecifi

cse

ctio

nna

me

men

-tio

ned

belo

w,

such

asÄ

ckno

w-

ledg

emen

ts",

"Ded

icat

ions

",Ë

n-do

rsem

ents

",or

"His

tory

".)

To"P

rese

rve

the

Title

öfsu

cha

sec-

tion

whe

nyo

um

odif

yth

eD

o-cu

men

tm

eans

that

itre

mai

nsa

sect

ion

Ënt

itled

XY

Zäc

cord

ing

toth

isde

finiti

on.

The

Doc

umen

tm

ayin

clud

eW

arra

nty

Dis

clai

mer

sne

xtto

the

notic

ew

hich

stat

esth

atth

isL

icen

seap

plie

sto

the

Doc

u-m

ent.

The

seW

arra

nty

Dis

clai

-m

ers

are

cons

ider

edto

bein

clu-

ded

byre

fere

nce

inth

isL

icen

se,

but

only

asre

gard

sdi

scla

imin

gw

arra

ntie

s:an

yot

her

impl

icat

i-on

that

thes

eW

arra

nty

Dis

clai

-m

ers

may

have

isvo

idan

dha

sno

effe

cton

the

mea

ning

ofth

isL

icen

se.2

.VE

RB

AT

IMC

OPY

-IN

G

You

may

copy

and

dist

ribu

teth

eD

ocum

ent

inan

ym

ediu

m,

eith

erco

mm

erci

ally

orno

ncom

-m

erci

ally

,pro

vide

dth

atth

isL

i-ce

nse,

the

copy

righ

tnot

ices

,and

the

licen

seno

tice

sayi

ngth

isL

i-

cens

eap

plie

sto

the

Doc

umen

tar

ere

prod

uced

inal

lcop

ies,

and

that

you

add

noot

herc

ondi

tions

wha

tsoe

ver

toth

ose

ofth

isL

i-ce

nse.

You

may

not

use

tech

ni-

calm

easu

res

toob

stru

ctor

con-

trol

the

read

ing

orfu

rthe

rco

-py

ing

ofth

eco

pies

you

mak

eor

dist

ribu

te.H

owev

er,y

oum

ayac

cept

com

pens

atio

nin

exch

an-

gefo

rcop

ies.

Ifyo

udi

stri

bute

ala

rge

enou

ghnu

mbe

rof

copi

esyo

um

usta

lso

follo

wth

eco

ndi-

tions

inse

ctio

n3.

You

may

also

lend

copi

es,

un-

der

the

sam

eco

nditi

ons

stat

edab

ove,

and

you

may

publ

icly

disp

lay

copi

es.3

.CO

PYIN

GIN

QU

AN

TIT

Y

Ifyo

upu

blis

hpr

inte

dco

pies

(or

copi

esin

med

iath

atco

mm

only

have

prin

ted

cove

rs)

ofth

eD

o-cu

men

t,nu

mbe

ring

mor

eth

an10

0,an

dth

eD

ocum

ent’s

licen

seno

tice

requ

ires

Cov

erTe

xts,

you

mus

ten

clos

eth

eco

pies

inco

-ve

rsth

atca

rry,

clea

rly

and

legi

-bl

y,al

lthe

seC

over

Text

s:Fr

ont-

Cov

erTe

xts

onth

efr

ont

cove

r,an

dB

ack-

Cov

erTe

xts

onth

eba

ckco

ver.

Bot

hco

vers

mus

tal

socl

earl

yan

dle

gibl

yid

entif

y

Page 260: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

you

asth

epu

blis

hero

fthe

seco

-pi

es.

The

fron

tco

ver

mus

tpr

e-se

ntth

efu

lltit

lew

ithal

lwor

dsof

the

title

equa

llypr

omin

ent

and

visi

ble.

You

may

add

othe

rm

ater

ial

onth

eco

vers

inad

di-

tion.

Cop

ying

with

chan

ges

li-m

ited

toth

eco

vers

,as

long

asth

eypr

eser

veth

etit

leof

the

Do-

cum

ent

and

satis

fyth

ese

cond

i-tio

ns,c

anbe

trea

ted

asve

rbat

imco

pyin

gin

othe

rres

pect

s.

Ifth

ere

quir

edte

xts

for

eith

erco

ver

are

too

volu

min

ous

tofit

legi

bly,

you

shou

ldpu

tth

efir

ston

eslis

ted

(as

man

yas

fitre

-as

onab

ly)

onth

eac

tual

cove

r,an

dco

ntin

ueth

ere

ston

toad

ja-

cent

page

s.

Ifyo

upu

blis

hor

dist

ribu

teO

paqu

eco

pies

ofth

eD

ocu-

men

tnu

mbe

ring

mor

eth

an10

0,yo

um

ust

eith

erin

clu-

dea

mac

hine

-rea

dabl

eTr

ans-

pare

ntco

pyal

ong

with

each

Opa

que

copy

,ors

tate

inor

with

each

Opa

que

copy

aco

mpu

ter-

netw

ork

loca

tion

from

whi

chth

ege

nera

lne

twor

k-us

ing

pu-

blic

has

acce

ssto

dow

nloa

dus

ing

publ

ic-s

tand

ard

netw

ork

prot

ocol

sa

com

plet

eTr

ansp

a-

rent

copy

ofth

eD

ocum

ent,

free

ofad

ded

mat

eria

l.If

you

use

the

latte

rop

tion,

you

mus

tta

kere

ason

ably

prud

ent

step

s,w

hen

you

begi

ndi

stri

butio

nof

Opa

que

copi

esin

quan

tity,

toen

-su

reth

atth

isTr

ansp

aren

tco

pyw

illre

mai

nth

usac

cess

ible

atth

est

ated

loca

tion

until

atle

ast

one

year

afte

rth

ela

sttim

eyo

udi

stri

bute

anO

paqu

eco

py(d

i-re

ctly

orth

roug

hyo

urag

ents

orre

taile

rs)

ofth

ated

ition

toth

epu

blic

.

Itis

requ

este

d,bu

tnot

requ

ired

,th

atyo

uco

ntac

tth

eau

thor

sof

the

Doc

umen

twel

lbef

ore

redi

s-tr

ibut

ing

any

larg

enu

mbe

rofc

o-pi

es,

togi

veth

ema

chan

ceto

prov

ide

you

with

anup

date

dve

r-si

onof

the

Doc

umen

t.4.

MO

DI-

FIC

AT

ION

S

You

may

copy

and

dist

ribu

tea

Mod

ified

Ver

sion

ofth

eD

ocu-

men

tun

der

the

cond

ition

sof

sect

ions

2an

d3

abov

e,pr

ovi-

ded

that

you

rele

ase

the

Mod

i-fie

dV

ersi

onun

derp

reci

sely

this

Lic

ense

,with

the

Mod

ified

Ver

-si

onfil

ling

the

role

ofth

eD

o-cu

men

t,th

uslic

ensi

ngdi

stri

bu-

tion

and

mod

ifica

tion

ofth

eM

o-

difie

dV

ersi

onto

who

ever

pos-

sess

esa

copy

ofit.

Inad

ditio

n,yo

um

ustd

oth

ese

thin

gsin

the

Mod

ified

Ver

sion

:

*A

.Use

inth

eTi

tlePa

ge(a

ndon

the

cove

rs,i

fan

y)a

title

dis-

tinct

from

that

ofth

eD

ocum

ent,

and

from

thos

eof

prev

ious

vers

i-on

s(w

hich

shou

ld,i

fthe

rew

ere

any,

belis

ted

inth

eH

isto

ryse

c-tio

nof

the

Doc

umen

t).Y

oum

ayus

eth

esa

me

title

asa

prev

ious

vers

ion

ifth

eor

igin

alpu

blis

her

ofth

atve

rsio

ngi

ves

perm

issi

-on

.*B

.Lis

ton

the

Title

Page

,as

auth

ors,

one

orm

ore

pers

ons

oren

titie

sre

spon

sibl

efo

rau

t-ho

rshi

pof

the

mod

ifica

tions

inth

eM

odifi

edV

ersi

on,

toge

ther

with

atle

ast

five

ofth

epr

inci

-pa

laut

hors

ofth

eD

ocum

ent(

all

ofits

prin

cipa

laut

hors

,if

itha

sfe

wer

than

five)

,unl

ess

they

re-

leas

eyo

ufr

omth

isre

quir

emen

t.*

C.S

tate

onth

eTi

tlepa

geth

ena

me

ofth

epu

blis

her

ofth

eM

odifi

edV

ersi

on,a

sth

epu

blis

-he

r.*

D.P

rese

rve

all

the

copy

-ri

ghtn

otic

esof

the

Doc

umen

t.*

E.A

ddan

appr

opri

ate

copy

righ

tno

tice

fory

ourm

odifi

catio

nsad

-ja

cent

toth

eot

her

copy

righ

tno-

tices

.*

F.In

clud

e,im

med

iate

-

lyaf

ter

the

copy

righ

tno

tices

,alic

ense

notic

egi

ving

the

publ

icpe

rmis

sion

tous

eth

eM

odifi

edV

ersi

onun

der

the

term

sof

this

Lic

ense

,in

the

form

show

nin

the

Add

endu

mbe

low

.*G

.Pre

-se

rve

inth

atlic

ense

notic

eth

efu

lllis

tsof

Inva

rian

tSe

ctio

nsan

dre

quir

edC

over

Text

sgi

ven

inth

eD

ocum

ent’s

licen

seno

ti-ce

.*

H.

Incl

ude

anun

alte

red

copy

ofth

isL

icen

se.

*I.

Pre-

serv

eth

ese

ctio

nE

ntitl

ed"H

is-

tory

",Pr

eser

veits

Title

,and

add

toit

anite

mst

atin

gat

leas

tth

etit

le,y

ear,

new

auth

ors,

and

pu-

blis

her

ofth

eM

odifi

edV

ersi

-on

asgi

ven

onth

eTi

tlePa

ge.

Ifth

ere

isno

sect

ion

Ent

itled

"His

tory

ïnth

eD

ocum

ent,

crea

-te

one

stat

ing

the

title

,yea

r,au

t-ho

rs,

and

publ

ishe

rof

the

Do-

cum

enta

sgi

ven

onits

Title

Pa-

ge,t

hen

add

anite

mde

scri

bing

the

Mod

ified

Ver

sion

asst

ated

inth

epr

evio

usse

nten

ce.

*J.

Pres

erve

the

netw

ork

loca

tion,

ifan

y,gi

ven

inth

eD

ocum

ent

for

publ

icac

cess

toa

Tran

spa-

rent

copy

ofth

eD

ocum

ent,

and

likew

ise

the

netw

ork

loca

tions

give

nin

the

Doc

umen

tfo

rpr

e-vi

ous

vers

ions

itw

asba

sed

on.

The

sem

aybe

plac

edin

the

"His

-

Page 261: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

tory

ßect

ion.

You

may

omit

ane

t-w

ork

loca

tion

for

aw

ork

that

was

publ

ishe

dat

leas

tfo

urye

-ar

sbe

fore

the

Doc

umen

tits

elf,

orif

the

orig

inal

publ

ishe

roft

heve

rsio

nit

refe

rsto

give

spe

rmis

-si

on.

*K

.Fo

ran

yse

ctio

nE

nt-

itled

Äck

now

ledg

emen

tsör

"De-

dica

tions

",Pr

eser

veth

eTi

tleof

the

sect

ion,

and

pres

erve

inth

ese

ctio

nal

lthe

subs

tanc

ean

dto

-ne

ofea

chof

the

cont

ribu

tor

ackn

owle

dgem

ents

and/

orde

di-

catio

nsgi

ven

ther

ein.

*L

.Pr

e-se

rve

all

the

Inva

rian

tSe

ctio

nsof

the

Doc

umen

t,un

alte

red

inth

eir

text

and

inth

eir

title

s.Se

c-tio

nnu

mbe

rsor

the

equi

vale

ntar

eno

tco

nsid

ered

part

ofth

ese

ctio

ntit

les.

*M

.D

elet

ean

yse

ctio

nE

ntitl

edË

ndor

sem

ents

".Su

cha

sect

ion

may

not

bein

-cl

uded

inth

eM

odifi

edV

ersi

-on

.*N

.Do

notr

etitl

ean

yex

is-

ting

sect

ion

tobe

Ent

itled

Ën-

dors

emen

tsör

toco

nflic

tin

title

with

any

Inva

rian

tSec

tion.

*O

.Pr

eser

vean

yW

arra

nty

Dis

clai

-m

ers.

Ifth

eM

odifi

edV

ersi

onin

clu-

des

new

fron

t-m

atte

rsec

tions

orap

pend

ices

that

qual

ify

asSe

-co

ndar

ySe

ctio

nsan

dco

ntai

nno

mat

eria

lco

pied

from

the

Doc

u-m

ent,

you

may

atyo

urop

tion

desi

gnat

eso

me

oral

lof

thes

ese

ctio

nsas

inva

rian

t.To

doth

is,

add

thei

rtit

les

toth

elis

tof

In-

vari

antS

ectio

nsin

the

Mod

ified

Ver

sion

’slic

ense

notic

e.T

hese

title

sm

ust

bedi

stin

ctfr

oman

yot

hers

ectio

ntit

les.

You

may

add

ase

ctio

nE

ntit-

led

Ënd

orse

men

ts",

prov

ided

itco

ntai

nsno

thin

gbu

ten

dors

e-m

ents

ofyo

urM

odifi

edV

ersi

onby

vari

ous

part

ies—

for

exam

p-le

,sta

tem

ents

ofpe

erre

view

orth

atth

ete

xtha

sbe

enap

prov

edby

anor

gani

zatio

nas

the

auth

o-ri

tativ

ede

finiti

onof

ast

anda

rd.

You

may

add

apa

ssag

eof

upto

five

wor

dsas

aFr

ont-

Cov

erTe

xt,

and

apa

ssag

eof

upto

25w

ords

asa

Bac

k-C

over

Text

,to

the

end

ofth

elis

tof

Co-

ver

Text

sin

the

Mod

ified

Ver

si-

on.

Onl

yon

epa

ssag

eof

Fron

t-C

over

Text

and

one

ofB

ack-

Cov

erTe

xtm

aybe

adde

dby

(or

thro

ugh

arra

ngem

ents

mad

eby

)an

yon

een

tity.

Ifth

eD

ocum

ent

alre

ady

incl

udes

aco

vert

extf

orth

esa

me

cove

r,pr

evio

usly

ad-

ded

byyo

uor

byar

rang

emen

t

mad

eby

the

sam

een

tity

you

are

actin

gon

beha

lfof

,you

may

not

add

anot

her;

but

you

may

repl

ace

the

old

one,

onex

pli-

citp

erm

issi

onfr

omth

epr

evio

uspu

blis

hert

hata

dded

the

old

one.

The

auth

or(s

)an

dpu

blis

her(

s)of

the

Doc

umen

tdo

notb

yth

isL

icen

segi

vepe

rmis

sion

tous

eth

eir

nam

esfo

rpu

blic

ityfo

ror

toas

sert

orim

ply

endo

rse-

men

tofa

nyM

odifi

edV

ersi

on.5

.C

OM

BIN

ING

DO

CU

ME

NT

S

You

may

com

bine

the

Doc

u-m

ent

with

othe

rdo

cum

ents

re-

leas

edun

der

this

Lic

ense

,un

-de

rth

ete

rms

defin

edin

sect

ion

4ab

ove

for

mod

ified

vers

ions

,pr

ovid

edth

atyo

uin

clud

ein

the

com

bina

tion

allo

fth

eIn

vari

ant

Sect

ions

ofal

lof

the

orig

inal

docu

men

ts,u

nmod

ified

,and

list

them

alla

sIn

vari

antS

ectio

nsof

your

com

bine

dw

ork

inits

licen

-se

notic

e,an

dth

atyo

upr

eser

veal

lthe

irW

arra

nty

Dis

clai

mer

s.

The

com

bine

dw

ork

need

only

cont

ain

one

copy

ofth

isL

icen

-se

,an

dm

ultip

leid

entic

alIn

va-

rian

tSe

ctio

nsm

aybe

repl

aced

with

asi

ngle

copy

.If

ther

ear

e

mul

tiple

Inva

rian

tSec

tions

with

the

sam

ena

me

butd

iffer

entc

on-

tent

s,m

ake

the

title

ofea

chsu

chse

ctio

nun

ique

byad

ding

atth

een

dof

it,in

pare

nthe

ses,

the

na-

me

ofth

eor

igin

alau

thor

orpu

-bl

ishe

rof

that

sect

ion

ifkn

own,

orel

sea

uniq

uenu

mbe

r.M

ake

the

sam

ead

just

men

tto

the

sec-

tion

title

sin

the

listo

fIn

vari

ant

Sect

ions

inth

elic

ense

notic

eof

the

com

bine

dw

ork.

Inth

eco

mbi

natio

n,yo

um

ust

com

bine

any

sect

ions

Ent

itled

"His

tory

ïnth

eva

riou

sor

igin

aldo

cum

ents

,fo

rmin

gon

ese

c-tio

nE

ntitl

ed"H

isto

ry";

likew

i-se

com

bine

any

sect

ions

Ent

-itl

edÄ

ckno

wle

dgem

ents

",an

dan

yse

ctio

nsE

ntitl

ed"D

edic

ati-

ons"

.Y

oum

ust

dele

teal

lse

c-tio

nsE

ntitl

edË

ndor

sem

ents

".6.

CO

LL

EC

TIO

NS

OF

DO

CU

-M

EN

TS

You

may

mak

ea

colle

ctio

nco

n-si

stin

gof

the

Doc

umen

tan

dot

her

docu

men

tsre

leas

edun

der

this

Lic

ense

,and

repl

ace

the

in-

divi

dual

copi

esof

this

Lic

ense

inth

eva

riou

sdo

cum

ents

with

asi

ngle

copy

that

isin

clud

edin

the

colle

ctio

n,pr

ovid

edth

atyo

u

Page 262: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

follo

wth

eru

les

ofth

isL

icen

-se

for

verb

atim

copy

ing

ofea

chof

the

docu

men

tsin

allo

ther

re-

spec

ts.

You

may

extr

act

asi

ngle

do-

cum

ent

from

such

aco

llect

ion,

and

dist

ribu

teit

indi

vidu

ally

un-

der

this

Lic

ense

,pr

ovid

edyo

uin

sert

aco

pyof

this

Lic

en-

sein

toth

eex

trac

ted

docu

men

t,an

dfo

llow

this

Lic

ense

inal

lot

her

resp

ects

rega

rdin

gve

rba-

timco

pyin

gof

that

docu

men

t.7.

AG

GR

EG

AT

ION

WIT

HIN

DE

-PE

ND

EN

TW

OR

KS

Aco

mpi

latio

nof

the

Doc

umen

tor

itsde

rivat

ives

with

othe

rsep

a-ra

tean

din

depe

nden

tdoc

umen

tsor

wor

ks,i

nor

ona

volu

me

ofa

stor

age

ordi

stri

butio

nm

ediu

m,

isca

lled

anäg

greg

ateï

fth

eco

-py

righ

tre

sulti

ngfr

omth

eco

m-

pila

tion

isno

tus

edto

limit

the

lega

lrig

hts

ofth

eco

mpi

latio

n’s

user

sbe

yond

wha

tthe

indi

vidu

-al

wor

kspe

rmit.

Whe

nth

eD

o-cu

men

tis

incl

uded

inan

aggr

e-ga

te,t

his

Lic

ense

does

nota

pp-

lyto

the

othe

rw

orks

inth

eag

-gr

egat

ew

hich

are

not

them

sel-

ves

deriv

ativ

ew

orks

ofth

eD

o-cu

men

t.

Ifth

eC

over

Text

requ

irem

ento

fse

ctio

n3

isap

plic

able

toth

ese

copi

esof

the

Doc

umen

t,th

enif

the

Doc

umen

tis

less

than

one

half

ofth

een

tire

aggr

egat

e,th

eD

ocum

ent’s

Cov

erTe

xts

may

bepl

aced

onco

vers

that

brac

ket

the

Doc

umen

twith

inth

eag

gre-

gate

,ort

heel

ectr

onic

equi

vale

ntof

cove

rsif

the

Doc

umen

tis

inel

ectr

onic

form

.Oth

erw

ise

they

mus

tap

pear

onpr

inte

dco

vers

that

brac

ket

the

who

leag

greg

a-te

.8.T

RA

NSL

AT

ION

Tran

slat

ion

isco

nsid

ered

aki

ndof

mod

ifica

tion,

soyo

um

aydi

s-tr

ibut

etr

ansl

atio

nsof

the

Doc

u-m

entu

nder

the

term

sof

sect

ion

4.R

epla

cing

Inva

rian

tSe

ctio

nsw

ithtr

ansl

atio

nsre

quir

essp

e-ci

alpe

rmis

sion

from

thei

rco

py-

righ

tho

lder

s,bu

tyo

um

ayin

-cl

ude

tran

slat

ions

ofso

me

oral

lInv

aria

ntSe

ctio

nsin

addi

tion

toth

eor

igin

alve

rsio

nsof

the-

seIn

vari

ant

Sect

ions

.Y

oum

ayin

clud

ea

tran

slat

ion

ofth

isL

i-ce

nse,

and

all

the

licen

seno

ti-ce

sin

the

Doc

umen

t,an

dan

yW

arra

nty

Dis

clai

mer

s,pr

ovid

edth

atyo

ual

soin

clud

eth

eor

igi-

nal

Eng

lish

vers

ion

ofth

isL

i-ce

nse

and

the

orig

inal

vers

ions

ofth

ose

notic

esan

ddi

scla

imer

s.In

case

ofa

disa

gree

men

tbe

t-w

een

the

tran

slat

ion

and

the

ori-

gina

lver

sion

ofth

isL

icen

seor

ano

tice

ordi

scla

imer

,the

orig

inal

vers

ion

will

prev

ail.

Ifa

sect

ion

inth

eD

ocum

ent

isE

ntitl

edÄ

ckno

wle

dgem

ents

","D

edic

atio

ns",

or"H

isto

ry",

the

requ

irem

ent

(sec

tion

4)to

Pre-

serv

eits

Title

(sec

tion

1)w

illty

-pi

cally

requ

ire

chan

ging

the

ac-

tual

title

.9.T

ER

MIN

AT

ION

You

may

notc

opy,

mod

ify,

sub-

licen

se,

ordi

stri

bute

the

Doc

u-m

ent

exce

ptas

expr

essl

ypr

ovi-

ded

unde

rth

isL

icen

se.A

nyat

-te

mpt

othe

rwis

eto

copy

,m

odi-

fy,s

ublic

ense

,or

dist

ribu

teit

isvo

id,a

ndw

illau

tom

atic

ally

ter-

min

ate

your

righ

tsun

dert

his

Li-

cens

e.

How

ever

,if

you

ceas

eal

lvio

la-

tion

ofth

isL

icen

se,

then

your

licen

sefr

oma

part

icul

arco

py-

righ

thol

deri

sre

inst

ated

(a)p

ro-

visi

onal

ly,

unle

ssan

dun

tilth

eco

pyri

ght

hold

erex

plic

itly

and

final

lyte

rmin

ates

your

licen

se,

and

(b)p

erm

anen

tly,i

fthe

copy

-ri

ght

hold

erfa

ilsto

notif

yyo

u

ofth

evi

olat

ion

byso

me

rea-

sona

ble

mea

nspr

ior

to60

days

afte

rthe

cess

atio

n.

Mor

eove

r,yo

urlic

ense

from

apa

rtic

ular

copy

righ

thol

deri

sre

-in

stat

edpe

rman

ently

ifth

eco

py-

righ

tho

lder

notifi

esyo

uof

the

viol

atio

nby

som

ere

ason

able

mea

ns,t

his

isth

efir

sttim

eyo

uha

vere

ceiv

edno

tice

ofvi

olat

i-on

ofth

isL

icen

se(f

oran

yw

ork)

from

that

copy

righ

tho

lder

,and

you

cure

the

viol

atio

npr

ior

to30

days

afte

ryou

rrec

eipt

ofth

eno

tice.

Term

inat

ion

ofyo

urri

ghts

un-

der

this

sect

ion

does

not

term

i-na

teth

elic

ense

sof

part

ies

who

have

rece

ived

copi

esor

righ

tsfr

omyo

uun

der

this

Lic

ense

.If

your

righ

tsha

vebe

ente

rmin

a-te

dan

dno

tper

man

ently

rein

sta-

ted,

rece

ipt

ofa

copy

ofso

me

oral

lof

the

sam

em

ater

iald

oes

notg

ive

you

any

righ

tsto

use

it.10

.FU

TU

RE

RE

VIS

ION

SO

FT

HIS

LIC

EN

SE

The

Free

Soft

war

eFo

unda

ti-on

may

publ

ish

new

,re

vise

dve

rsio

nsof

the

GN

UFr

eeD

ocum

enta

tion

Lic

ense

from

Page 263: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

time

totim

e.Su

chne

wve

r-si

ons

will

besi

mila

rin

spi-

rit

toth

epr

esen

tve

rsio

n,bu

tm

aydi

ffer

inde

tail

toad

dres

sne

wpr

oble

ms

orco

ncer

ns.S

eeht

tp://

ww

w.g

nu.o

rg/c

opyl

eft/.

Eac

hve

rsio

nof

the

Lic

ense

isgi

ven

adi

stin

guis

hing

vers

ion

num

ber.

Ifth

eD

ocum

ents

peci

-fie

sth

ata

part

icul

arnu

mbe

red

vers

ion

ofth

isL

icen

seör

any

la-

ter

vers

ionä

pplie

sto

it,yo

uha

-ve

the

optio

nof

follo

win

gth

ete

rms

and

cond

ition

sei

ther

ofth

atsp

ecifi

edve

rsio

nor

ofan

yla

ter

vers

ion

that

has

been

pu-

blis

hed

(not

asa

draf

t)by

the

Free

Soft

war

eFo

unda

tion.

Ifth

eD

ocum

ent

does

not

spec

ify

ave

rsio

nnu

mbe

rof

this

Lic

en-

se,y

oum

aych

oose

any

vers

ion

ever

publ

ishe

d(n

otas

adr

aft)

byth

eFr

eeSo

ftw

are

Foun

datio

n.If

the

Doc

umen

tspe

cifie

sth

ata

prox

yca

nde

cide

whi

chfu

ture

vers

ions

ofth

isL

icen

seca

nbe

used

,th

atpr

oxy’

spu

blic

stat

e-m

ento

fac

cept

ance

ofa

vers

ion

perm

anen

tlyau

thor

izes

you

toch

oose

that

vers

ion

for

the

Do-

cum

ent.

11.R

EL

ICE

NSI

NG

"Mas

sive

Mul

tiaut

hor

Col

labo

-ra

tion

Site

"(or

"MM

CSi

te")

me-

ans

any

Wor

ldW

ide

Web

ser-

vert

hatp

ublis

hes

copy

righ

tabl

ew

orks

and

also

prov

ides

prom

i-ne

ntfa

cilit

ies

for

anyb

ody

toed

itth

ose

wor

ks.

Apu

blic

wi-

kith

atan

ybod

yca

ned

itis

anex

ampl

eof

such

ase

rver

.A

"Mas

sive

Mul

tiaut

hor

Col

labo

-ra

tion"

(or"

MM

C")

cont

aine

din

the

site

mea

nsan

yse

tof

copy

-ri

ghta

ble

wor

ksth

uspu

blis

hed

onth

eM

MC

site

.

"CC

-BY

-SA

"mea

nsth

eC

reat

i-ve

Com

mon

sA

ttrib

utio

n-Sh

are

Alik

e3.

0lic

ense

publ

ishe

dby

Cre

ativ

eC

omm

onsC

orpo

ratio

n,a

not-

for-

profi

tcor

pora

tion

with

apr

inci

pal

plac

eof

busi

ness

inSa

nFr

anci

sco,

Cal

ifor

nia,

asw

ell

asfu

ture

copy

left

vers

ions

ofth

atlic

ense

publ

ishe

dby

that

sam

eor

gani

zatio

n.

Ïnco

rpor

ate"

mea

nsto

publ

ish

orre

publ

ish

aD

ocum

ent,

inw

hole

orin

part

,as

part

ofan

othe

rDo-

cum

ent.

An

MM

Cis

ëlig

ible

for

relic

en-

sing

ïfit

islic

ense

dun

dert

hisL

i-ce

nse,

and

ifal

lw

orks

that

we-

refir

stpu

blis

hed

unde

rth

isL

i-ce

nse

som

ewhe

reot

hert

han

this

MM

C,

and

subs

eque

ntly

inco

r-po

rate

din

who

leor

inpa

rtin

toth

eM

MC

,(1)

had

noco

vert

exts

orin

vari

ants

ectio

ns,a

nd(2

)we-

reth

usin

corp

orat

edpr

iort

oN

o-ve

mbe

r1,2

008.

The

oper

ator

ofan

MM

CSi

tem

ayre

publ

ish

anM

MC

cont

ai-

ned

inth

esi

teun

der

CC

-BY

-SA

onth

esa

me

site

atan

ytim

ebe

fore

Aug

ust

1,20

09,

prov

i-de

dth

eM

MC

isel

igib

lefo

rrel

i-ce

nsin

g.A

DD

EN

DU

M:H

owto

use

this

Lic

ense

for

your

docu

-m

ents

Tous

eth

isL

icen

sein

ado

cu-

men

tyou

have

wri

tten,

incl

ude

aco

pyof

the

Lic

ense

inth

edo

cu-

men

tan

dpu

tth

efo

llow

ing

co-

pyri

ght

and

licen

seno

tices

just

afte

rthe

title

page

:

Cop

yrig

ht(C

)Y

EA

RY

OU

RN

AM

E.P

erm

issi

onis

gran

ted

toco

py,

dist

ribu

tean

d/or

mod

ify

this

docu

men

tun

der

the

term

sof

the

GN

UFr

eeD

ocum

enta

ti-on

Lic

ense

,V

ersi

on1.

3or

any

late

rve

rsio

npu

blis

hed

byth

eFr

eeSo

ftw

are

Foun

datio

n;w

ith

noIn

vari

antS

ectio

ns,n

oFr

ont-

Cov

erTe

xts,

and

noB

ack-

Cov

erTe

xts.

Aco

pyof

the

licen

seis

incl

uded

inth

ese

ctio

nen

title

d"G

NU

Free

Doc

umen

tatio

nL

i-ce

nse"

.

Ifyo

uha

veIn

vari

ant

Sect

ions

,Fr

ont-

Cov

erTe

xts

and

Bac

k-C

over

Text

s,re

plac

eth

e"w

ith..

.Te

xts.

"lin

ew

ithth

is:

with

the

Inva

rian

tSe

ctio

nsbe

ing

LIS

TT

HE

IRT

ITL

ES,

with

the

Fron

t-C

over

Text

sbe

ing

LIS

T,an

dw

ithth

eB

ack-

Cov

erTe

xts

bein

gL

IST.

Ifyo

uha

veIn

vari

ant

Sect

ions

with

out

Cov

erTe

xts,

orso

me

othe

rco

mbi

natio

nof

the

thre

e,m

erge

thos

etw

oal

tern

ativ

esto

suit

the

situ

atio

n.

Ifyo

urdo

cum

ent

cont

ains

nont

rivia

lexa

mpl

esof

prog

ram

code

,w

ere

com

men

dre

leas

ing

thes

eex

ampl

esin

para

llelu

nder

your

choi

ceof

free

soft

war

eli-

cens

e,su

chas

the

GN

UG

ener

alPu

blic

Lic

ense

,to

perm

itth

eir

use

infr

eeso

ftw

are.

Page 264: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

13.3

GN

UL

esse

rG

ener

alPu

blic

Lic

ense

GN

UL

ESS

ER

GE

NE

RA

LPU

-B

LIC

LIC

EN

SE

Ver

sion

3,29

June

2007

Cop

yrig

ht©

2007

Free

Soft

war

eFo

unda

tion,

Inc.

<http

://fs

f.org

/>

Eve

ryon

eis

perm

itted

toco

pyan

ddi

stri

bute

verb

atim

copi

esof

this

licen

sedo

cum

ent,

but

chan

ging

itis

nota

llow

ed.

Thi

sve

rsio

nof

the

GN

UL

esse

rG

ener

alPu

blic

Lic

ense

inco

rpo-

rate

sth

ete

rms

and

cond

ition

sof

vers

ion

3of

the

GN

UG

ene-

ral

Publ

icL

icen

se,

supp

lem

en-

ted

byth

ead

ditio

nal

perm

issi

-on

slis

ted

belo

w.

0.A

dditi

onal

Defi

nitio

ns.

As

used

here

in,

“thi

sL

icen

se”

refe

rsto

vers

ion

3of

the

GN

UL

esse

rG

ener

alPu

blic

Lic

ense

,an

dth

e“G

NU

GPL

”re

fers

tove

rsio

n3

ofth

eG

NU

Gen

eral

Publ

icL

icen

se.

“The

Lib

rary

”re

fers

toa

cove

r-ed

wor

kgo

vern

edby

this

Lic

en-

se,o

ther

than

anA

pplic

atio

nor

aC

ombi

ned

Wor

kas

defin

edbe

-lo

w.

An

“App

licat

ion”

isan

yw

ork

that

mak

esus

eof

anin

terf

ace

prov

ided

byth

eL

ibra

ry,

but

whi

chis

noto

ther

wis

eba

sed

onth

eL

ibra

ry.D

efini

nga

subc

lass

ofa

clas

sde

fined

byth

eL

ibra

ryis

deem

eda

mod

eof

usin

gan

in-

terf

ace

prov

ided

byth

eL

ibra

ry.

A“C

ombi

ned

Wor

k”is

aw

ork

prod

uced

byco

mbi

ning

orlin

-ki

ngan

App

licat

ion

with

the

Li-

brar

y.T

hepa

rtic

ular

vers

ion

ofth

eL

ibra

ryw

ithw

hich

the

Com

-bi

ned

Wor

kw

asm

ade

isal

soca

lled

the

“Lin

ked

Ver

sion

”.

The

“Min

imal

Cor

resp

ondi

ngSo

urce

”fo

ra

Com

bine

dW

ork

mea

nsth

eC

orre

spon

ding

Sour

-ce

for

the

Com

bine

dW

ork,

ex-

clud

ing

any

sour

ceco

defo

rpor

-tio

nsof

the

Com

bine

dW

ork

that

,con

side

red

inis

olat

ion,

are

base

don

the

App

licat

ion,

and

noto

nth

eL

inke

dV

ersi

on.

The

“Cor

resp

ondi

ngA

pplic

ati-

onC

ode”

fora

Com

bine

dW

ork

mea

nsth

eob

ject

code

and/

orso

urce

code

for

the

App

licat

i-on

,in

clud

ing

any

data

and

uti-

lity

prog

ram

sne

eded

for

re-

prod

ucin

gth

eC

ombi

ned

Wor

kfr

omth

eA

pplic

atio

n,bu

texc

lu-

ding

the

Syst

emL

ibra

ries

ofth

eC

ombi

ned

Wor

k.1.

Exc

eptio

nto

Sect

ion

3of

the

GN

UG

PL.

You

may

conv

eya

cove

red

wor

kun

der

sect

ions

3an

d4

ofth

isL

icen

sew

ithou

tbei

ngbo

und

byse

ctio

n3

ofth

eG

NU

GPL

.2.

Con

veyi

ngM

odifi

edV

ersi

ons.

Ifyo

um

odif

ya

copy

ofth

eL

i-br

ary,

and,

inyo

urm

odifi

cati-

ons,

afa

cilit

yre

fers

toa

func

-tio

nor

data

tobe

supp

lied

byan

App

licat

ion

that

uses

the

faci

lity

(oth

erth

anas

anar

gum

ent

pas-

sed

whe

nth

efa

cilit

yis

invo

ked)

,th

enyo

um

ayco

nvey

aco

pyof

the

mod

ified

vers

ion:

*a)

unde

rthi

sLic

ense

,pro

vide

dth

atyo

um

ake

ago

odfa

ithef

-fo

rtto

ensu

reth

at,i

nth

eev

ent

anA

pplic

atio

ndo

esno

tsu

pply

the

func

tion

orda

ta,t

hefa

cilit

yst

illop

erat

es,a

ndpe

rfor

msw

ha-

teve

rpar

tofi

tspu

rpos

ere

mai

nsm

eani

ngfu

l,or

*b)

unde

rth

eG

NU

GPL

,with

none

ofth

ead

-di

tiona

lpe

rmis

sion

sof

this

Li-

cens

eap

plic

able

toth

atco

py.

3.O

bjec

tC

ode

Inco

rpor

atin

gM

ater

ial

from

Lib

rary

Hea

der

File

s.

The

obje

ctco

defo

rmof

anA

pp-

licat

ion

may

inco

rpor

ate

mat

eri-

alfr

oma

head

erfil

eth

atis

part

ofth

eL

ibra

ry.Y

oum

ayco

nvey

such

obje

ctco

deun

dert

erm

sof

your

choi

ce,p

rovi

ded

that

,ift

hein

corp

orat

edm

ater

ial

isno

tli-

mite

dto

num

eric

alpa

ram

eter

s,da

tast

ruct

ure

layo

uts

and

ac-

cess

ors,

orsm

allm

acro

s,in

line

func

tions

and

tem

plat

es(t

enor

few

erlin

esin

leng

th),

you

dobo

thof

the

follo

win

g:

Page 265: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

*a)

Giv

epr

omin

entn

otic

ew

ithea

chco

pyof

the

obje

ctco

deth

atth

eL

ibra

ryis

used

init

and

that

the

Lib

rary

and

itsus

ear

eco

ver-

edby

this

Lic

ense

.*b)

Acc

om-

pany

the

obje

ctco

dew

itha

copy

ofth

eG

NU

GPL

and

this

licen

-se

docu

men

t.

4.C

ombi

ned

Wor

ks.

You

may

conv

eya

Com

bi-

ned

Wor

kun

der

term

sof

your

choi

ceth

at,

take

nto

geth

er,

ef-

fect

ivel

ydo

not

rest

rict

mod

ifi-

catio

nof

the

port

ions

ofth

eL

i-br

ary

cont

aine

din

the

Com

bi-

ned

Wor

kan

dre

vers

een

gine

e-ri

ngfo

rde

bugg

ing

such

mod

ifi-

catio

ns,

ifyo

ual

sodo

each

ofth

efo

llow

ing:

*a)

Giv

epr

omin

entn

otic

ew

ithea

chco

pyof

the

Com

bine

dW

ork

that

the

Lib

rary

isus

edin

itan

dth

atth

eL

ibra

ryan

dits

use

are

cove

red

byth

isL

icen

se.

*b)

Acc

ompa

nyth

eC

ombi

ned

Wor

kw

itha

copy

ofth

eG

NU

GPL

and

this

licen

sedo

cum

ent.

*c)

For

aC

ombi

ned

Wor

kth

atdi

spla

ysco

pyri

ght

notic

esdu

-ri

ngex

ecut

ion,

incl

ude

the

co-

pyri

ght

notic

efo

rth

eL

ibra

ry

amon

gth

ese

notic

es,a

sw

ella

sa

refe

renc

edi

rect

ing

the

user

toth

eco

pies

ofth

eG

NU

GPL

and

this

licen

sedo

cum

ent.

*d)

Do

one

ofth

efo

llow

ing:

o0)

Con

-ve

yth

eM

inim

alC

orre

spon

ding

Sour

ceun

der

the

term

sof

this

Lic

ense

,and

the

Cor

resp

ondi

ngA

pplic

atio

nC

ode

ina

form

sui-

tabl

efo

r,an

dun

der

term

sth

atpe

rmit,

the

user

tore

com

bine

orre

link

the

App

licat

ion

with

am

odifi

edve

rsio

nof

the

Lin

-ke

dV

ersi

onto

prod

uce

am

o-di

fied

Com

bine

dW

ork,

inth

em

anne

rsp

ecifi

edby

sect

ion

6of

the

GN

UG

PLfo

rco

nvey

-in

gC

orre

spon

ding

Sour

ce.o

1)U

sea

suita

ble

shar

edlib

rary

me-

chan

ism

for

linki

ngw

ithth

eL

i-br

ary.

Asu

itabl

em

echa

nism

ison

eth

at(a

)us

esat

run

time

aco

pyof

the

Lib

rary

alre

ady

pre-

sent

onth

eus

er’s

com

pute

rsy

s-te

m,

and

(b)

will

oper

ate

pro-

perl

yw

itha

mod

ified

vers

ion

ofth

eL

ibra

ryth

atis

inte

rfac

e-co

mpa

tible

with

the

Lin

ked

Ver

-si

on.*

e)Pr

ovid

eIn

stal

latio

nIn

-fo

rmat

ion,

buto

nly

ifyo

uw

ould

othe

rwis

ebe

requ

ired

topr

ovid

esu

chin

form

atio

nun

der

sect

ion

6of

the

GN

UG

PL,a

ndon

lyto

the

exte

ntth

atsu

chin

form

atio

n

isne

cess

ary

toin

stal

lan

dex

e-cu

tea

mod

ified

vers

ion

ofth

eC

ombi

ned

Wor

kpr

oduc

edby

re-

com

bini

ngor

relin

king

the

Ap-

plic

atio

nw

itha

mod

ified

vers

i-on

ofth

eL

inke

dV

ersi

on.

(If

you

use

optio

n4d

0,th

eIn

stal

la-

tion

Info

rmat

ion

mus

tacc

ompa

-ny

the

Min

imal

Cor

resp

ondi

ngSo

urce

and

Cor

resp

ondi

ngA

pp-

licat

ion

Cod

e.If

you

use

optio

n4d

1,yo

um

ustp

rovi

deth

eIn

stal

-la

tion

Info

rmat

ion

inth

em

an-

ners

peci

fied

byse

ctio

n6

ofth

eG

NU

GPL

forc

onve

ying

Cor

re-

spon

ding

Sour

ce.)

5.C

ombi

ned

Lib

rari

es.

You

may

plac

elib

rary

faci

litie

sth

atar

ea

wor

kba

sed

onth

eL

i-br

ary

side

bysi

dein

asi

ngle

li-br

ary

toge

ther

with

othe

rlib

ra-

ryfa

cilit

ies

that

are

not

App

li-ca

tions

and

are

not

cove

red

byth

isL

icen

se,a

ndco

nvey

such

aco

mbi

ned

libra

ryun

dert

erm

sof

your

choi

ce,

ifyo

udo

both

ofth

efo

llow

ing:

*a)

Acc

ompa

nyth

eco

mbi

ned

libra

ryw

itha

copy

ofth

esa

me

wor

kba

sed

onth

eL

ibra

ry,

un-

com

bine

dw

ithan

yot

her

libra

-

ryfa

cilit

ies,

conv

eyed

unde

rthe

term

sof

this

Lic

ense

.*b)

Giv

epr

omin

ent

notic

ew

ithth

eco

m-

bine

dlib

rary

that

part

ofit

isa

wor

kba

sed

onth

eL

ibra

ry,a

ndex

plai

ning

whe

reto

find

the

ac-

com

pany

ing

unco

mbi

ned

form

ofth

esa

me

wor

k.

6.R

evis

edV

ersi

ons

ofth

eG

NU

Les

serG

ener

alPu

blic

Lic

ense

.

The

Free

Soft

war

eFo

unda

tion

may

publ

ish

revi

sed

and/

orne

wve

rsio

nsof

the

GN

UL

esse

rG

e-ne

ral

Publ

icL

icen

sefr

omtim

eto

time.

Such

new

vers

ions

will

besi

mila

rin

spir

itto

the

pres

ent

vers

ion,

butm

aydi

ffer

inde

tail

toad

dres

sne

wpr

oble

ms

orco

n-ce

rns.

Eac

hve

rsio

nis

give

na

dist

ingu

-is

hing

vers

ion

num

ber.

Ifth

eL

i-br

ary

asyo

ure

ceiv

edit

spec

ifies

that

ace

rtai

nnu

mbe

red

vers

ion

ofth

eG

NU

Les

ser

Gen

eral

Pu-

blic

Lic

ense

“or

any

late

rve

rsi-

on”

appl

ies

toit,

you

have

the

optio

nof

follo

win

gth

ete

rms

and

cond

ition

sei

ther

ofth

atpu

-bl

ishe

dve

rsio

nor

ofan

yla

ter

vers

ion

publ

ishe

dby

the

Free

Soft

war

eFo

unda

tion.

Ifth

eL

i-

Page 266: ogrammierung - Wikimedia€¦ · 113 114 116 119 147 149 155 156 157 171 205 209 10.1des Befehls help 209 217 223 235

brar

yas

you

rece

ived

itdo

esno

tsp

ecif

ya

vers

ion

num

ber

ofth

eG

NU

Les

ser

Gen

eral

Publ

icL

i-ce

nse,

you

may

choo

sean

yve

r-si

onof

the

GN

UL

esse

rG

ene-

ral

Publ

icL

icen

seev

erpu

blis

-he

dby

the

Free

Soft

war

eFo

un-

datio

n.

Ifth

eL

ibra

ryas

you

rece

ived

itsp

ecifi

esth

ata

prox

yca

nde

-ci

dew

heth

erfu

ture

vers

ions

ofth

eG

NU

Les

ser

Gen

eral

Publ

icL

icen

sesh

alla

pply

,tha

tpro

xy’s

publ

icst

atem

ent

ofac

cept

ance

ofan

yve

rsio

nis

perm

anen

taut

-ho

riza

tion

fory

outo

choo

seth

atve

rsio

nfo

rthe

Lib

rary

.