Difference between revisions of "While ... do"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
  
  
<pre>
+
#!/bin/bash
#!/bin/bash
+
while true; do
 +
  ((my_var++))
 +
  echo $my_var
 +
done
  
while true; do
+
 
  ((my_var++))
+
* <code>cat your_file.txt | [[while read]] i; do echo "YOUR_TEST $i"; done</code>
  echo $my_var
+
* <code>cat your_file.txt | [[while read]] i; do echo "$(date) $i"; done</code>
done
 
</pre>
 
  
  

Revision as of 15:13, 19 November 2020

Advertising: