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) }' 

bc

echo "$charge_percent" | bc -l

bash (nicht portable, deshalb nicht zu empfehlen)

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