Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unary operator expected through SSH #537

Closed
jfernandz opened this issue Dec 12, 2017 · 4 comments
Closed

Unary operator expected through SSH #537

jfernandz opened this issue Dec 12, 2017 · 4 comments
Labels

Comments

@jfernandz
Copy link

I haven't got any issue when I include screenfetch in my .bashrc but when this .bashrc is in a remote server and I connect it via SSH I get the following message:

/usr/bin/screenfetch: line 1341: [: =: unary operator expected
@darealshinji
Copy link
Collaborator

What's the output of screenfetch -v?

@jfernandz
Copy link
Author

jfernandz commented Dec 12, 2017

┌—————[wyre]—————[~] 
└> $ LC_ALL=C screenfetch -v
:: Finding distro...found as 'Arch Linux '
:: Finding hostname and user...found as 'wyre@PentiumServer'
:: Finding kernel version...found as 'x86_64 Linux 4.14.4-1-ARCH'
:: Finding current uptime...found as '1d 34m'
:: Finding current package count...found as '786'
:: Finding current shell...found as 'bash 4.4.12'
:: Finding current resolution(s)...found as ''
:: Finding desktop environment...found as 'Not Present'
:: Finding window manager...found as 'Not Found'
:: Finding window manager theme...found as 'Not Found'
:: Finding GTK2 theme...found as 'Not Found'
:: Finding GTK3 theme...found as 'Not Found'
:: Finding icon theme...found as 'Not Found'
:: Finding user font...found as 'Not Found'
:: Finding current CPU...found as 'Pentium Dual-Core E5800 @ 2x 3.2GHz'
:: Finding current GPU...found as 'Not Found'
:: Finding current RAM usage...found as '3138MiB / 3952MiB'
/usr/bin/screenfetch: line 1341: [: =: unary operator expected
                   -`                 
                  .o+`                 wyre@PentiumServer
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: x86_64 Linux 4.14.4-1-ARCH
               `+oooooo:               Uptime: 1d 34m
               -+oooooo+:              Packages: 786
             `/:-:++oooo+:             Shell: bash 4.4.12
            `/++++/+++++++:            CPU: Pentium Dual-Core E5800 @ 2x 3.2GHz
           `/++++++++++++++:           GPU: 
          `/+++ooooooooooooo/`         RAM: 3138MiB / 3952MiB
         ./ooosssso++osssssso+`       
        .oossssso-````/ossssss+`      
       -osssssso.      :ssssssso.     
      :osssssss/        osssso+++.    
     /ossssssss/        +ssssooo/-    
   `/ossssso+/:-        -:/+osssso+-  
  `+sso+:-`                 `.-/+oso: 
 `++:.                           `-/+/
 .`                                 `/
┌—————[wyre]—————[~] 
└> $ 

@tschaerni
Copy link

tschaerni commented Mar 6, 2018

I also had the same warning. It's an easy fix (I don't think it's necessary to make a pull request)

Original Line 1341:
if [ $gpu = intel ]; then
Fix:
if [ "$gpu" = "intel" ]; then
Or (that one is only bash conform):
if [[ $gpu = intel ]]; then

explanation --> https://stackoverflow.com/questions/13617843/unary-operator-expected

darealshinji added a commit that referenced this issue Mar 6, 2018
@darealshinji
Copy link
Collaborator

Thanks for the info. The recent version already had the double brackets, but I've added the quotes anyway.

torao-1892 pushed a commit to torao-1892/screenFetch that referenced this issue Jun 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants