scripting:sh
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:sh [2014-06-17 21:03] – translated to english, some bashish added root | scripting: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) == | ||
- | < | + | < |
while read LINE | while read LINE | ||
do | do | ||
Line 12: | Line 12: | ||
or in bashish with command output: | or in bashish with command output: | ||
- | < | + | < |
while read LINE | while read LINE | ||
do | do | ||
Line 22: | Line 22: | ||
awk | awk | ||
- | | + | <code bash> |
- | echo "" | + | echo 3.14158 2.348 | awk '{ printf(" |
- | + | echo "" | |
+ | awk '{ print $1/2 }' <<< | ||
+ | </ | ||
bc | bc | ||
- | | + | <code bash> |
+ | echo " | ||
+ | </ | ||
bash | bash | ||
- | | + | <code bash> |
+ | result=$((30*1000/ | ||
+ | </ |
scripting/sh.1403031793.txt.gz · Last modified: 2014-12-18 20:10 (external edit)