I'd like to minimize disk operations in BASH script when executing my freshly written script, which depends on writing outputs to file and then processing with grep, awk..
It is possible to read all the output from commands to the variables, BUT (yes, there's always one
then the data in variables doesn't retain the formatting.
I'm attaching my script and outputs that I get in the files for better explanation what the script does.
I would like the script not to make so much writing to disk if the RAID fails (because at that moment it's fairly high disk usage getting Rebuilding the RAID set)
and get the output to a variable and process then all from memory, not the file.
huh, I hope for some explanation if anyone could lead me