User Tools

Site Tools


scripting:sh

This is an old revision of the document!


Bourne Shell

Text zeilenweise verarbeiten
while read LINE;
do
        echo "${LINE}"
done <<< "`printf "line1\nline2"`"
Calculations

awk

echo 3.14158 2.348 | awk '{ printf("%f\n", $1/$2) }' 
echo "" | awk '{ printf("%i\n", 10+5) }'

bc

echo "$charge_percent" | bc -l

bash

result=$((30*1000/60))
scripting/sh.1385114696.txt.gz · Last modified: 2014-12-18 20:10 (external edit)