Binary Operator expected message when opening new terminal












1















I use a Lubuntu 16.04



This morning I started getting this message in terminal whenever I open a new terminal bash: [: /home/timi95/workspace/WEB_TECHNOLOGIES/Angular: binary operator expected
, I'm not sure what's wrong and I've tried a tset,reset , sudo updates etc.



There doesn't even exist a file or folder called 'Angular' in the path specified.



Any clues on what might be happening or how to fix this ?



The last thing I remember installing aside from updates, was electron-forge. I was considering cross-platform desktop app tools. Do you think that has anything to do with this ?










share|improve this question


















  • 1





    This means there has to be an error in one of the if statements or statements that use [ , inside either ~/.bashrc or one of the files that get sourced by it. Open the file in gedit or other text editor and go through the file. Specifically look for variables related to Angular - that's already suggested by the output

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:54











  • As for whether there's anything to do with updates/installationis - yes it is possible. Certain applications take liberty of appending configurations to user's ~/.bashrc, such as modifying the $PATH variable or exporting extra variables among other things.

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:55











  • @SergiyKolodyazhnyy yes I think you are right. I saw these lines : # tabtab source for electron-forge package # uninstall by removing these lines or running tabtab uninstall electron-forge` [ -f /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash ] && . /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash` and the seem to be missing a ']' . If I add that bracket and then reset terminal , is my issue resolved or is there more to it ?

    – timi95
    Jan 5 at 11:33











  • @SergiyKolodyazhnyy Thanks I fixed it, it was the trailing ']' and a couple of un-escaped spaces. Thank you very much !.

    – timi95
    Jan 5 at 11:43











  • well, I have just posted an answer about it, but yes, the escaping or quoting is the solution. Congrats on resolving it !

    – Sergiy Kolodyazhnyy
    Jan 5 at 11:44
















1















I use a Lubuntu 16.04



This morning I started getting this message in terminal whenever I open a new terminal bash: [: /home/timi95/workspace/WEB_TECHNOLOGIES/Angular: binary operator expected
, I'm not sure what's wrong and I've tried a tset,reset , sudo updates etc.



There doesn't even exist a file or folder called 'Angular' in the path specified.



Any clues on what might be happening or how to fix this ?



The last thing I remember installing aside from updates, was electron-forge. I was considering cross-platform desktop app tools. Do you think that has anything to do with this ?










share|improve this question


















  • 1





    This means there has to be an error in one of the if statements or statements that use [ , inside either ~/.bashrc or one of the files that get sourced by it. Open the file in gedit or other text editor and go through the file. Specifically look for variables related to Angular - that's already suggested by the output

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:54











  • As for whether there's anything to do with updates/installationis - yes it is possible. Certain applications take liberty of appending configurations to user's ~/.bashrc, such as modifying the $PATH variable or exporting extra variables among other things.

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:55











  • @SergiyKolodyazhnyy yes I think you are right. I saw these lines : # tabtab source for electron-forge package # uninstall by removing these lines or running tabtab uninstall electron-forge` [ -f /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash ] && . /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash` and the seem to be missing a ']' . If I add that bracket and then reset terminal , is my issue resolved or is there more to it ?

    – timi95
    Jan 5 at 11:33











  • @SergiyKolodyazhnyy Thanks I fixed it, it was the trailing ']' and a couple of un-escaped spaces. Thank you very much !.

    – timi95
    Jan 5 at 11:43











  • well, I have just posted an answer about it, but yes, the escaping or quoting is the solution. Congrats on resolving it !

    – Sergiy Kolodyazhnyy
    Jan 5 at 11:44














1












1








1








I use a Lubuntu 16.04



This morning I started getting this message in terminal whenever I open a new terminal bash: [: /home/timi95/workspace/WEB_TECHNOLOGIES/Angular: binary operator expected
, I'm not sure what's wrong and I've tried a tset,reset , sudo updates etc.



There doesn't even exist a file or folder called 'Angular' in the path specified.



Any clues on what might be happening or how to fix this ?



The last thing I remember installing aside from updates, was electron-forge. I was considering cross-platform desktop app tools. Do you think that has anything to do with this ?










share|improve this question














I use a Lubuntu 16.04



This morning I started getting this message in terminal whenever I open a new terminal bash: [: /home/timi95/workspace/WEB_TECHNOLOGIES/Angular: binary operator expected
, I'm not sure what's wrong and I've tried a tset,reset , sudo updates etc.



There doesn't even exist a file or folder called 'Angular' in the path specified.



Any clues on what might be happening or how to fix this ?



The last thing I remember installing aside from updates, was electron-forge. I was considering cross-platform desktop app tools. Do you think that has anything to do with this ?







command-line bash lubuntu






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 5 at 10:50









timi95timi95

83




83








  • 1





    This means there has to be an error in one of the if statements or statements that use [ , inside either ~/.bashrc or one of the files that get sourced by it. Open the file in gedit or other text editor and go through the file. Specifically look for variables related to Angular - that's already suggested by the output

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:54











  • As for whether there's anything to do with updates/installationis - yes it is possible. Certain applications take liberty of appending configurations to user's ~/.bashrc, such as modifying the $PATH variable or exporting extra variables among other things.

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:55











  • @SergiyKolodyazhnyy yes I think you are right. I saw these lines : # tabtab source for electron-forge package # uninstall by removing these lines or running tabtab uninstall electron-forge` [ -f /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash ] && . /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash` and the seem to be missing a ']' . If I add that bracket and then reset terminal , is my issue resolved or is there more to it ?

    – timi95
    Jan 5 at 11:33











  • @SergiyKolodyazhnyy Thanks I fixed it, it was the trailing ']' and a couple of un-escaped spaces. Thank you very much !.

    – timi95
    Jan 5 at 11:43











  • well, I have just posted an answer about it, but yes, the escaping or quoting is the solution. Congrats on resolving it !

    – Sergiy Kolodyazhnyy
    Jan 5 at 11:44














  • 1





    This means there has to be an error in one of the if statements or statements that use [ , inside either ~/.bashrc or one of the files that get sourced by it. Open the file in gedit or other text editor and go through the file. Specifically look for variables related to Angular - that's already suggested by the output

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:54











  • As for whether there's anything to do with updates/installationis - yes it is possible. Certain applications take liberty of appending configurations to user's ~/.bashrc, such as modifying the $PATH variable or exporting extra variables among other things.

    – Sergiy Kolodyazhnyy
    Jan 5 at 10:55











  • @SergiyKolodyazhnyy yes I think you are right. I saw these lines : # tabtab source for electron-forge package # uninstall by removing these lines or running tabtab uninstall electron-forge` [ -f /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash ] && . /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash` and the seem to be missing a ']' . If I add that bracket and then reset terminal , is my issue resolved or is there more to it ?

    – timi95
    Jan 5 at 11:33











  • @SergiyKolodyazhnyy Thanks I fixed it, it was the trailing ']' and a couple of un-escaped spaces. Thank you very much !.

    – timi95
    Jan 5 at 11:43











  • well, I have just posted an answer about it, but yes, the escaping or quoting is the solution. Congrats on resolving it !

    – Sergiy Kolodyazhnyy
    Jan 5 at 11:44








1




1





This means there has to be an error in one of the if statements or statements that use [ , inside either ~/.bashrc or one of the files that get sourced by it. Open the file in gedit or other text editor and go through the file. Specifically look for variables related to Angular - that's already suggested by the output

– Sergiy Kolodyazhnyy
Jan 5 at 10:54





This means there has to be an error in one of the if statements or statements that use [ , inside either ~/.bashrc or one of the files that get sourced by it. Open the file in gedit or other text editor and go through the file. Specifically look for variables related to Angular - that's already suggested by the output

– Sergiy Kolodyazhnyy
Jan 5 at 10:54













As for whether there's anything to do with updates/installationis - yes it is possible. Certain applications take liberty of appending configurations to user's ~/.bashrc, such as modifying the $PATH variable or exporting extra variables among other things.

– Sergiy Kolodyazhnyy
Jan 5 at 10:55





As for whether there's anything to do with updates/installationis - yes it is possible. Certain applications take liberty of appending configurations to user's ~/.bashrc, such as modifying the $PATH variable or exporting extra variables among other things.

– Sergiy Kolodyazhnyy
Jan 5 at 10:55













@SergiyKolodyazhnyy yes I think you are right. I saw these lines : # tabtab source for electron-forge package # uninstall by removing these lines or running tabtab uninstall electron-forge` [ -f /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash ] && . /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash` and the seem to be missing a ']' . If I add that bracket and then reset terminal , is my issue resolved or is there more to it ?

– timi95
Jan 5 at 11:33





@SergiyKolodyazhnyy yes I think you are right. I saw these lines : # tabtab source for electron-forge package # uninstall by removing these lines or running tabtab uninstall electron-forge` [ -f /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash ] && . /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash` and the seem to be missing a ']' . If I add that bracket and then reset terminal , is my issue resolved or is there more to it ?

– timi95
Jan 5 at 11:33













@SergiyKolodyazhnyy Thanks I fixed it, it was the trailing ']' and a couple of un-escaped spaces. Thank you very much !.

– timi95
Jan 5 at 11:43





@SergiyKolodyazhnyy Thanks I fixed it, it was the trailing ']' and a couple of un-escaped spaces. Thank you very much !.

– timi95
Jan 5 at 11:43













well, I have just posted an answer about it, but yes, the escaping or quoting is the solution. Congrats on resolving it !

– Sergiy Kolodyazhnyy
Jan 5 at 11:44





well, I have just posted an answer about it, but yes, the escaping or quoting is the solution. Congrats on resolving it !

– Sergiy Kolodyazhnyy
Jan 5 at 11:44










1 Answer
1






active

oldest

votes


















2














In your error message you have



/home/timi95/workspace/WEB_TECHNOLOGIES/Angular


however in the comments you've mentioned the line



/home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


Notice the space between Angular and projects. This is the core of the issue.



In [ command ( and yes, that's a command also known as test, not just a bracket ) the -f operator expect a single argument after it. The space makes the line appear as if there are two arguments after -f. Thus, the issue should be fixed via either quoting the path or by escaping the space with backslash as in



/home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


Spaces in command line serve as word separators, and if they are not escaped or quoted the shell will treat the line as more words than wht you intended. Among other things, this is also one of the reasons why you should quote variables - without double quotes word splitting on whitespace, newline, or tab (because such is the default value of IFS variable which shell consults for word splitting) will be applied.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107140%2fbinary-operator-expected-message-when-opening-new-terminal%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    In your error message you have



    /home/timi95/workspace/WEB_TECHNOLOGIES/Angular


    however in the comments you've mentioned the line



    /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


    Notice the space between Angular and projects. This is the core of the issue.



    In [ command ( and yes, that's a command also known as test, not just a bracket ) the -f operator expect a single argument after it. The space makes the line appear as if there are two arguments after -f. Thus, the issue should be fixed via either quoting the path or by escaping the space with backslash as in



    /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


    Spaces in command line serve as word separators, and if they are not escaped or quoted the shell will treat the line as more words than wht you intended. Among other things, this is also one of the reasons why you should quote variables - without double quotes word splitting on whitespace, newline, or tab (because such is the default value of IFS variable which shell consults for word splitting) will be applied.






    share|improve this answer




























      2














      In your error message you have



      /home/timi95/workspace/WEB_TECHNOLOGIES/Angular


      however in the comments you've mentioned the line



      /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


      Notice the space between Angular and projects. This is the core of the issue.



      In [ command ( and yes, that's a command also known as test, not just a bracket ) the -f operator expect a single argument after it. The space makes the line appear as if there are two arguments after -f. Thus, the issue should be fixed via either quoting the path or by escaping the space with backslash as in



      /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


      Spaces in command line serve as word separators, and if they are not escaped or quoted the shell will treat the line as more words than wht you intended. Among other things, this is also one of the reasons why you should quote variables - without double quotes word splitting on whitespace, newline, or tab (because such is the default value of IFS variable which shell consults for word splitting) will be applied.






      share|improve this answer


























        2












        2








        2







        In your error message you have



        /home/timi95/workspace/WEB_TECHNOLOGIES/Angular


        however in the comments you've mentioned the line



        /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


        Notice the space between Angular and projects. This is the core of the issue.



        In [ command ( and yes, that's a command also known as test, not just a bracket ) the -f operator expect a single argument after it. The space makes the line appear as if there are two arguments after -f. Thus, the issue should be fixed via either quoting the path or by escaping the space with backslash as in



        /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


        Spaces in command line serve as word separators, and if they are not escaped or quoted the shell will treat the line as more words than wht you intended. Among other things, this is also one of the reasons why you should quote variables - without double quotes word splitting on whitespace, newline, or tab (because such is the default value of IFS variable which shell consults for word splitting) will be applied.






        share|improve this answer













        In your error message you have



        /home/timi95/workspace/WEB_TECHNOLOGIES/Angular


        however in the comments you've mentioned the line



        /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


        Notice the space between Angular and projects. This is the core of the issue.



        In [ command ( and yes, that's a command also known as test, not just a bracket ) the -f operator expect a single argument after it. The space makes the line appear as if there are two arguments after -f. Thus, the issue should be fixed via either quoting the path or by escaping the space with backslash as in



        /home/timi95/workspace/WEB_TECHNOLOGIES/Angular projects/test-forge-project/node_modules/tabtab/.completions/electron-forge.bash


        Spaces in command line serve as word separators, and if they are not escaped or quoted the shell will treat the line as more words than wht you intended. Among other things, this is also one of the reasons why you should quote variables - without double quotes word splitting on whitespace, newline, or tab (because such is the default value of IFS variable which shell consults for word splitting) will be applied.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 5 at 11:43









        Sergiy KolodyazhnyySergiy Kolodyazhnyy

        71.4k9147313




        71.4k9147313






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107140%2fbinary-operator-expected-message-when-opening-new-terminal%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei