User Tools

Site Tools


scripting:sh

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:sh [2014-12-18 20:08] – external edit 127.0.0.1scripting:sh [2016-05-20 17:00] (current) root
Line 3: Line 3:
 == Loop through multi line text (including spaces) == == Loop through multi line text (including spaces) ==
  
-<code>+<code bash>
 while read LINE while read LINE
 do do
Line 12: Line 12:
 or in bashish with command output: or in bashish with command output:
  
-<code>+<code bash>
 while read LINE while read LINE
 do do
Line 22: Line 22:
  
 awk awk
-  echo 3.14158 2.348 | awk '{ printf("%f\n", $1/$2) }'  +<code bash> 
-  echo "" | awk '{ printf("%i\n", 10+5) }' +echo 3.14158 2.348 | awk '{ printf("%f\n", $1/$2) }'  
-  +echo "" | awk '{ printf("%i\n", 10+5) }' 
 +awk '{ print $1/2 }' <<< "5" 
 +</code> 
 bc bc
-  echo "$charge_percent" | bc -l+<code bash> 
 +echo "$charge_percent" | bc -l 
 +</code>
  
 bash bash
-  result=$((30*1000/60)) +<code bash> 
 +result=$((30*1000/60)) 
 +</code>
scripting/sh.1418929733.txt.gz · Last modified: 2016-01-10 21:29 (external edit)