What is uname-r | grep fc?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I was reading a .sh file and find a line written as



if[ "`uname -r | grep fc`" == " " ]; then


But I don't find the meaning of fc and the whole expression.



I am using Ubuntu 16.04 LTS.



Thanks in Advance.







share|improve this question



















  • Are the typos in that line made by you or are they from the script?
    – muru
    Jun 2 at 5:45






  • 2




    The command in the question can never evaluate to true. Either uname -r contains the letters fc, in which case grep outputs that line. It is guaranteed to not equal a simple space character (as it has to contain at least the caracters "fc"). If, on the other hand, uname -r doesn't contain "fc", grep will output nothing which also is not equal to a single space. So both possible cases are false. That being said, can you please double check that you pasted the line exactly as written in the script, including all special characters and all spaces?
    – Lienhart Woitok
    Jun 2 at 7:26







  • 1




    Example : uname -r | grep fc → 4.16.12-300. fc28 .x86_64. ... I.e. checking if the kernel is Fedora. Seems to be from a driver install script ubuntuforums.org/archive/index.php/t-2282796.html : "Realtek Wi-Fi driver Auto installationscript", "November, 21 2011 v1.1.0"
    – Knud Larsen
    Jun 2 at 8:09















up vote
0
down vote

favorite












I was reading a .sh file and find a line written as



if[ "`uname -r | grep fc`" == " " ]; then


But I don't find the meaning of fc and the whole expression.



I am using Ubuntu 16.04 LTS.



Thanks in Advance.







share|improve this question



















  • Are the typos in that line made by you or are they from the script?
    – muru
    Jun 2 at 5:45






  • 2




    The command in the question can never evaluate to true. Either uname -r contains the letters fc, in which case grep outputs that line. It is guaranteed to not equal a simple space character (as it has to contain at least the caracters "fc"). If, on the other hand, uname -r doesn't contain "fc", grep will output nothing which also is not equal to a single space. So both possible cases are false. That being said, can you please double check that you pasted the line exactly as written in the script, including all special characters and all spaces?
    – Lienhart Woitok
    Jun 2 at 7:26







  • 1




    Example : uname -r | grep fc → 4.16.12-300. fc28 .x86_64. ... I.e. checking if the kernel is Fedora. Seems to be from a driver install script ubuntuforums.org/archive/index.php/t-2282796.html : "Realtek Wi-Fi driver Auto installationscript", "November, 21 2011 v1.1.0"
    – Knud Larsen
    Jun 2 at 8:09













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I was reading a .sh file and find a line written as



if[ "`uname -r | grep fc`" == " " ]; then


But I don't find the meaning of fc and the whole expression.



I am using Ubuntu 16.04 LTS.



Thanks in Advance.







share|improve this question











I was reading a .sh file and find a line written as



if[ "`uname -r | grep fc`" == " " ]; then


But I don't find the meaning of fc and the whole expression.



I am using Ubuntu 16.04 LTS.



Thanks in Advance.









share|improve this question










share|improve this question




share|improve this question









asked Jun 2 at 4:24









Sanmveg saini

1042




1042











  • Are the typos in that line made by you or are they from the script?
    – muru
    Jun 2 at 5:45






  • 2




    The command in the question can never evaluate to true. Either uname -r contains the letters fc, in which case grep outputs that line. It is guaranteed to not equal a simple space character (as it has to contain at least the caracters "fc"). If, on the other hand, uname -r doesn't contain "fc", grep will output nothing which also is not equal to a single space. So both possible cases are false. That being said, can you please double check that you pasted the line exactly as written in the script, including all special characters and all spaces?
    – Lienhart Woitok
    Jun 2 at 7:26







  • 1




    Example : uname -r | grep fc → 4.16.12-300. fc28 .x86_64. ... I.e. checking if the kernel is Fedora. Seems to be from a driver install script ubuntuforums.org/archive/index.php/t-2282796.html : "Realtek Wi-Fi driver Auto installationscript", "November, 21 2011 v1.1.0"
    – Knud Larsen
    Jun 2 at 8:09

















  • Are the typos in that line made by you or are they from the script?
    – muru
    Jun 2 at 5:45






  • 2




    The command in the question can never evaluate to true. Either uname -r contains the letters fc, in which case grep outputs that line. It is guaranteed to not equal a simple space character (as it has to contain at least the caracters "fc"). If, on the other hand, uname -r doesn't contain "fc", grep will output nothing which also is not equal to a single space. So both possible cases are false. That being said, can you please double check that you pasted the line exactly as written in the script, including all special characters and all spaces?
    – Lienhart Woitok
    Jun 2 at 7:26







  • 1




    Example : uname -r | grep fc → 4.16.12-300. fc28 .x86_64. ... I.e. checking if the kernel is Fedora. Seems to be from a driver install script ubuntuforums.org/archive/index.php/t-2282796.html : "Realtek Wi-Fi driver Auto installationscript", "November, 21 2011 v1.1.0"
    – Knud Larsen
    Jun 2 at 8:09
















Are the typos in that line made by you or are they from the script?
– muru
Jun 2 at 5:45




Are the typos in that line made by you or are they from the script?
– muru
Jun 2 at 5:45




2




2




The command in the question can never evaluate to true. Either uname -r contains the letters fc, in which case grep outputs that line. It is guaranteed to not equal a simple space character (as it has to contain at least the caracters "fc"). If, on the other hand, uname -r doesn't contain "fc", grep will output nothing which also is not equal to a single space. So both possible cases are false. That being said, can you please double check that you pasted the line exactly as written in the script, including all special characters and all spaces?
– Lienhart Woitok
Jun 2 at 7:26





The command in the question can never evaluate to true. Either uname -r contains the letters fc, in which case grep outputs that line. It is guaranteed to not equal a simple space character (as it has to contain at least the caracters "fc"). If, on the other hand, uname -r doesn't contain "fc", grep will output nothing which also is not equal to a single space. So both possible cases are false. That being said, can you please double check that you pasted the line exactly as written in the script, including all special characters and all spaces?
– Lienhart Woitok
Jun 2 at 7:26





1




1




Example : uname -r | grep fc → 4.16.12-300. fc28 .x86_64. ... I.e. checking if the kernel is Fedora. Seems to be from a driver install script ubuntuforums.org/archive/index.php/t-2282796.html : "Realtek Wi-Fi driver Auto installationscript", "November, 21 2011 v1.1.0"
– Knud Larsen
Jun 2 at 8:09





Example : uname -r | grep fc → 4.16.12-300. fc28 .x86_64. ... I.e. checking if the kernel is Fedora. Seems to be from a driver install script ubuntuforums.org/archive/index.php/t-2282796.html : "Realtek Wi-Fi driver Auto installationscript", "November, 21 2011 v1.1.0"
– Knud Larsen
Jun 2 at 8:09











1 Answer
1






active

oldest

votes

















up vote
1
down vote













the special back tick char will return whatever is evaluated inside of the backticks. so uname -r | grep fc will return something only if your kernel release contains the letters fc. If no fc then it will just be the newline character. So the if statement will only evaluate to true when fc is not contained in your kernel string that is returned from uname. try doing



export a=`uname -r` 
echo $a


as a test






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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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%2f1042818%2fwhat-is-uname-r-grep-fc%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    the special back tick char will return whatever is evaluated inside of the backticks. so uname -r | grep fc will return something only if your kernel release contains the letters fc. If no fc then it will just be the newline character. So the if statement will only evaluate to true when fc is not contained in your kernel string that is returned from uname. try doing



    export a=`uname -r` 
    echo $a


    as a test






    share|improve this answer

























      up vote
      1
      down vote













      the special back tick char will return whatever is evaluated inside of the backticks. so uname -r | grep fc will return something only if your kernel release contains the letters fc. If no fc then it will just be the newline character. So the if statement will only evaluate to true when fc is not contained in your kernel string that is returned from uname. try doing



      export a=`uname -r` 
      echo $a


      as a test






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        the special back tick char will return whatever is evaluated inside of the backticks. so uname -r | grep fc will return something only if your kernel release contains the letters fc. If no fc then it will just be the newline character. So the if statement will only evaluate to true when fc is not contained in your kernel string that is returned from uname. try doing



        export a=`uname -r` 
        echo $a


        as a test






        share|improve this answer













        the special back tick char will return whatever is evaluated inside of the backticks. so uname -r | grep fc will return something only if your kernel release contains the letters fc. If no fc then it will just be the newline character. So the if statement will only evaluate to true when fc is not contained in your kernel string that is returned from uname. try doing



        export a=`uname -r` 
        echo $a


        as a test







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jun 2 at 5:17









        oldITdude

        111




        111






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1042818%2fwhat-is-uname-r-grep-fc%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491