FK Windows Cheatsheets: Unterschied zwischen den Versionen

Aus Hergipedia
Zur Navigation springen Zur Suche springen
Fkoehler (Diskussion | Beiträge)
Die Seite wurde neu angelegt: „Batch tricks fuer cmd.exe * http://www.ss64.com/ * Mastertip: alles Komplexe in FOR Kommando :z.B.: Backquotes `command` + grep FOR /F "delims= tokens=" ('comm...“
(kein Unterschied)

Version vom 12. März 2009, 17:21 Uhr

Batch tricks fuer cmd.exe

  • Mastertip: alles Komplexe in FOR Kommando
z.B.: Backquotes `command` + grep
FOR /F "delims= tokens=" ('command') DO
  • Variablen setzen (Quoting unnoetig)
set a=Dies ist ein Test.
echo %a%
-> Output: Dies ist ein Test
  • Variablensubstitution:
interactive: %VARNAME%
batch:  %%VARNAME%%
  • redirection auch am Anfang
 > hello.txt echo hello
 >> hello.txt echo world!
  • Quote mit ^