Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Program włączać w formie ./<nazwa_programu.sh> <nazwa_pliku_z_danymi>
- function saveToResultsFile {
- echo "$*" > wynik_bg.txt
- }
- function addToResultsFile {
- echo "$*" >> wynik_bg.txt
- }
- pattern="(?<=\(ev\):).*"
- i=1
- grep -ohP "$pattern" $1| while read -r line ; do
- stringarray=($line)
- homo=${stringarray[0]}
- lumo=${stringarray[1]}
- bg=`echo $lumo-$homo | bc -l`
- echo "$i: $bg"
- if [[ $i -eq 1 ]]; then
- saveToResultsFile "$i $bg"
- else
- addToResultsFile "$i $bg"
- fi
- i=$((i+1))
- done
- python3 ./IS_AASO_S174012-S174120-S174085.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement