| .. | .. |
|---|
| 1 | 1 | #!/bin/bash |
|---|
| 2 | +# SPDX-License-Identifier: GPL-2.0-only |
|---|
| 2 | 3 | |
|---|
| 3 | 4 | # Sergey Senozhatsky, 2015 |
|---|
| 4 | 5 | # sergey.senozhatsky.work@gmail.com |
|---|
| 5 | 6 | # |
|---|
| 6 | | -# This software is licensed under the terms of the GNU General Public |
|---|
| 7 | | -# License version 2, as published by the Free Software Foundation, and |
|---|
| 8 | | -# may be copied, distributed, and modified under those terms. |
|---|
| 9 | | -# |
|---|
| 10 | | -# This program is distributed in the hope that it will be useful, |
|---|
| 11 | | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | -# GNU General Public License for more details. |
|---|
| 14 | 7 | |
|---|
| 15 | 8 | |
|---|
| 16 | 9 | # This program is intended to plot a `slabinfo -X' stats, collected, |
|---|
| .. | .. |
|---|
| 157 | 150 | let lines=3 |
|---|
| 158 | 151 | out=`basename "$in"`"-slabs-by-loss" |
|---|
| 159 | 152 | `cat "$in" | grep -A "$lines" 'Slabs sorted by loss' |\ |
|---|
| 160 | | - egrep -iv '\-\-|Name|Slabs'\ |
|---|
| 153 | + grep -E -iv '\-\-|Name|Slabs'\ |
|---|
| 161 | 154 | | awk '{print $1" "$4+$2*$3" "$4}' > "$out"` |
|---|
| 162 | 155 | if [ $? -eq 0 ]; then |
|---|
| 163 | 156 | do_slabs_plotting "$out" |
|---|
| .. | .. |
|---|
| 166 | 159 | let lines=3 |
|---|
| 167 | 160 | out=`basename "$in"`"-slabs-by-size" |
|---|
| 168 | 161 | `cat "$in" | grep -A "$lines" 'Slabs sorted by size' |\ |
|---|
| 169 | | - egrep -iv '\-\-|Name|Slabs'\ |
|---|
| 162 | + grep -E -iv '\-\-|Name|Slabs'\ |
|---|
| 170 | 163 | | awk '{print $1" "$4" "$4-$2*$3}' > "$out"` |
|---|
| 171 | 164 | if [ $? -eq 0 ]; then |
|---|
| 172 | 165 | do_slabs_plotting "$out" |
|---|