
30 Nov
2019
30 Nov
'19
13:21
Andrei Borzenkov wrote:
Отправлено с iPhone
29 нояб. 2019 г., в 17:57, Peter Suetterlin <pit@astro.su.se> написал(а):
If I use the pipe, last output will be
Overall swap used: 0
WTF!? OVERALL is nicely added up in the loop, I can do echos/prints and see how it increases. After the pipe, it's zero again.
Left side of pipe is executed in sub process, so any changes to variables there are not visible in main process.
Yes, I assumed that, therefore tried the 'declare -g' to make it global, but didn't help either :( Guess I'd have to save output in a list variable instead, then and sort it afte the loop... -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org