Difference between revisions of "For"

From wikieduonline
Jump to navigation Jump to search
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{draft}}
+
{{lc}}
 
[[wikipedia:for]]
 
[[wikipedia:for]]
=== Example ===
+
=== Examples ===
  
 
   [[for i in]] `ls sa??`; do [[sar -f]] /var/log/[[sysstat]]/$i; done
 
   [[for i in]] `ls sa??`; do [[sar -f]] /var/log/[[sysstat]]/$i; done
  
=== Python ===
+
  YOURVAR="value1 value2 value3"
 +
  for i in $YOURVAR; do # Should not be quoted
 +
        echo "$i"
 +
  done
 +
 
 +
=== [[Python]] ===
 
  for i in range(5):
 
  for i in range(5):
 
   do_some_function()
 
   do_some_function()
 
 
  
 
== Related terms ==
 
== Related terms ==
Line 18: Line 21:
 
* [[Terraform]]: [[Splat expression]]
 
* [[Terraform]]: [[Splat expression]]
 
* [[Terraform: dynamic blocks]]
 
* [[Terraform: dynamic blocks]]
 +
* <code>[[until]]</code>
 +
* [[Flow control]]
  
 
== See also ==
 
== See also ==
 +
* {{for}}
 
* {{Bash}}
 
* {{Bash}}
 
* {{programming}}
 
* {{programming}}

Revision as of 06:27, 15 August 2022

Advertising: