Update 2024-6-10-how-we-decreased-bash-script-execution-by-16x-for-openpanel.md

This commit is contained in:
Stefan Pejcic
2024-06-09 14:57:41 +02:00
committed by GitHub
parent fde06a022d
commit 7d4f728a4f

View File

@@ -181,7 +181,7 @@ storage_file=$(echo "$cpu_ram_info" | awk '{print $9}' | sed 's/ //;s/B//')
plan_id=$(echo "$cpu_ram_info" | awk '{print $11}')
```
This ends being 6 echo statements of the same thing! To avoid that, we can use [read](https://linuxcommand.org/lc3_man_pages/readh.html) to assign the values from the database results:
This ends being 6 echo statements! To avoid it, we can use [read](https://linuxcommand.org/lc3_man_pages/readh.html) to assign the values from the database results: