KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.83k stars 453 forks source link

Can not calculate RAM with german locale #709

Closed alexbangert closed 3 years ago

alexbangert commented 3 years ago

I'm submitting a ... (check one with "x")

[x] bug report
[ ] new distro request

Bug report Tested with latest Version from https://raw.githubusercontent.com/KittyKatt/screenFetch/master/screenfetch-dev

There is a missing white space following "Speicher:" when calculating memory. Index 7 from free -b | awk 'NR==2{print $2"-"$7}' in line 1838 does not exist:

$ free -b
              gesamt       benutzt     frei      gemns.  Puffer/Cache verfügbar
Speicher:33678610432  4541730816 19486801920   201273344  9650077696 28465971200
Swap:    35176579072           0 35176579072

For comparison lang set to LANG=en_us_8859_1:

$ free -b                             
               total        used        free      shared  buff/cache   available
Mem:     33678610432  4628242432 19368370176   198152192  9681997824 28382617600
Swap:    35176579072           0 35176579072
:: Finding distro...found as 'Arch Linux n/a'
:: Finding hostname and user...found as 'alex@luna'
:: Finding kernel version...found as 'x86_64 Linux 5.11.2-zen1-1-zen'
:: Finding current uptime...found as '26m'
:: Finding current package count...found as '1507'
:: Finding current shell...found as 'zsh 5.8'
:: Finding current resolution(s)...found as '7200x2560'
:: Finding desktop environment...found as 'Xfce4'
:: Finding window manager...found as 'Xfwm4'
:: Finding window manager theme...found as 'Arc-Dark'
:: Finding GTK2 theme...found as 'Arc-Dark'
:: Finding GTK3 theme...found as 'Not Found'
:: Finding icon theme...found as 'Vibrancy-NonMono-Dark-Graphite'
:: Finding user font...found as 'Noto Sans 10'
:: Finding current CPU...found as 'AMD Ryzen 7 2700X Eight-Core @ 16x 3.7GHz'
:: Finding current disk usage...found as '7,1T / 11T (67%%)'
:: Finding current GPU...found as 'GeForce RTX 2080 Ti'
./sf.sh: Zeile 1839: 4467970048-: Syntaxfehler: Operator erwartet. (Fehlerverursachendes Zeichen ist "-").
                   -`                 
                  .o+`                 alex@luna
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: x86_64 Linux 5.11.2-zen1-1-zen
               `+oooooo:               Uptime: 26m
               -+oooooo+:              Packages: 1507
             `/:-:++oooo+:             Shell: zsh 5.8
            `/++++/+++++++:            Resolution: 7200x2560
           `/++++++++++++++:           DE: Xfce4
          `/+++ooooooooooooo/`         WM: Xfwm4
         ./ooosssso++osssssso+`        WM Theme: Arc-Dark
        .oossssso-````/ossssss+`       GTK Theme: Arc-Dark [GTK2]
       -osssssso.      :ssssssso.      Icon Theme: Vibrancy-NonMono-Dark-Graphite
      :osssssss/        osssso+++.     Font: Noto Sans 10
     /ossssssss/        +ssssooo/-     Disk: 7,1T / 11T (67%)
   `/ossssso+/:-        -:/+osssso+-   CPU: AMD Ryzen 7 2700X Eight-Core @ 16x 3.7GHz
  `+sso+:-`                 `.-/+oso:  GPU: GeForce RTX 2080 Ti
 `++:.                           `-/+/ RAM: 4467970048-
 .`                                 `/
KittyKatt commented 3 years ago

This looks related to #704. Closing this while linking to this from that issue.