Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docs:dollarstern [2016/03/14 23:49]
109.86.72.137 DINFQakTLa
docs:dollarstern [2016/03/15 00:12] (current)
91.89.129.106 old revision restored
Line 1: Line 1:
-http://buy-levaquin.science/#2268 levaquin buy, +====== $* und $@ Shell Uebergabeparameter ====== 
 + 
 +Um in einem Shell-Script oder einer Shell-Funktion deren Uebergabeparameter  
 +zu erhalten, gibt es die Variablen $* und *@ . 
 +Diese verhalten sich verschieden. Zusaetzlich variiert das Verhalten je nach Quoting. 
 + 
 +Oft findet man die Verwendung von $* **obwohl** dies bei Paramtern mit Leerzeichen 
 +Fehler erzeugt. 
 + 
 +Tatsaechlich wird man in den allermeisten Faellen "$@" (mit den "") verwenden wollen. 
 + 
 +Samples: 
 + 
 +<code> 
 +for i in "2 3 4" "5 6 7" ; do echo $i ; done 
 +-> 
 +    2 3 4 
 + 5 6 7 
 + 
 +x () { for i in $* ; do  echo $i; done; } 
 +x "2 3 4" "5 6 7" 
 +-> 
 +
 +
 +
 +
 +
 +
 + 
 +x () { for i in "$*" ; do  echo $i; done; } 
 +x "2 3 4" "5 6 7" 
 +-> 
 + 2 3 4 5 6 7 
 + 
 +x () { for i in $@ ; do  echo $i; done; } 
 +x "2 3 4" "5 6 7" 
 +-> 
 +
 +
 +
 +
 +
 +
 + 
 +x () { for i in "$@" ; do  echo $i; done; } 
 +x "2 3 4" "5 6 7" 
 +-> 
 + 2 3 4 
 + 5 6 7 
 +</code> 
docs/dollarstern.txt · Last modified: 2016/03/15 00:12 by 91.89.129.106
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki