Where is read command?How can I get help on terminal commands?What is the package name for “ls”...

PhD: When to quit and move on?

How can solar sailed ships be protected from space debris?

Should I hide my travel history to the UK when I apply for an Australian visa?

What is the difference between a historical drama and a period drama?

Bypass with wrong cvv of debit card and getting OTP

Did Stalin kill all Soviet officers involved in the Winter War?

A student "completes" 2-week project in 3 hours and lies about doing it himself

Is it possible to spoof an IP address to an exact number?

What could a Medieval society do with excess animal blood?

List of Implementations for common OR problems

Did Snape really give Umbridge a fake Veritaserum potion that Harry later pretended to drink?

How long had Bertha Mason been in the attic at the point of the events in Jane Eyre

Which are more efficient in putting out wildfires: planes or helicopters?

How to travel between two stationary worlds in the least amount of time? (time dilation)

Hiding a solar system in a nebula

"Best practices" for formulating MIPs

Isn't "Dave's protocol" good if only the database, and not the code, is leaked?

gzip compress a local folder and extract it to remote server

How is /a/ pronounced before n/m in French?

Wrong Output in self defined Quaternionic Multiplication

How might boat designs change in order to allow them to be pulled by dragons?

What do you call the motor that fuels the movement of a robotic arm?

Who are the police in Hong Kong?

SQL Server error 242 with ANSI datetime



Where is read command?


How can I get help on terminal commands?What is the package name for “ls” command?Trying to figure out what the command meanWhy does the command “xterm xterm” create an infinite recursion?Ignoring unknown parameterwhy does ls -Z returns files names with question marks next to them?Why is my command not remounting my partition as read-only?How to “finish” a command in terminal?@command -v gpg why is the version flag before the command?How to use the `od` command to check HDD zeroization?How do I get the exit status when using the sed command?where are commands actually stored in linux?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







4















I wanted to find read command, so I did:



$ which read


It returns exit status 1. Why does this happen?










share|improve this question


















  • 1





    read is a bash builtin, not a command on its own. Find information about read in man bash ( manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html )

    – waltinator
    8 hours ago






  • 2





    As stated in a comment to a previous question of you this is explained. read is built into bash. There is no exectuable for that command.

    – PerlDuck
    8 hours ago






  • 1





    If you want to know syntax details about read, you can run the command help read. See the this link for more details

    – sudodus
    8 hours ago













  • echo is a built-in command, but it has an executable path. @waltinator @PerlDuck

    – Mohammad Kholghi
    8 hours ago








  • 1





    @waltinator You're right that bash's echo builtin isn't the same as the external command /bin/echo that, in Ubuntu, is provided by GNU coreutils. But both support escape sequences, and both interpret them when the -e option is passed and not otherwise. In general, on an arbitrary system with an arbitrary Bourne-style shell, one cannot be sure its echo builtin (if any!) and the external command (which is required to be present) behave in a largely similar fashion. But with bash and /bin/echo in Ubuntu and most other GNU/Linux systems, they do.

    – Eliah Kagan
    2 hours ago




















4















I wanted to find read command, so I did:



$ which read


It returns exit status 1. Why does this happen?










share|improve this question


















  • 1





    read is a bash builtin, not a command on its own. Find information about read in man bash ( manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html )

    – waltinator
    8 hours ago






  • 2





    As stated in a comment to a previous question of you this is explained. read is built into bash. There is no exectuable for that command.

    – PerlDuck
    8 hours ago






  • 1





    If you want to know syntax details about read, you can run the command help read. See the this link for more details

    – sudodus
    8 hours ago













  • echo is a built-in command, but it has an executable path. @waltinator @PerlDuck

    – Mohammad Kholghi
    8 hours ago








  • 1





    @waltinator You're right that bash's echo builtin isn't the same as the external command /bin/echo that, in Ubuntu, is provided by GNU coreutils. But both support escape sequences, and both interpret them when the -e option is passed and not otherwise. In general, on an arbitrary system with an arbitrary Bourne-style shell, one cannot be sure its echo builtin (if any!) and the external command (which is required to be present) behave in a largely similar fashion. But with bash and /bin/echo in Ubuntu and most other GNU/Linux systems, they do.

    – Eliah Kagan
    2 hours ago
















4












4








4


1






I wanted to find read command, so I did:



$ which read


It returns exit status 1. Why does this happen?










share|improve this question














I wanted to find read command, so I did:



$ which read


It returns exit status 1. Why does this happen?







command-line






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 9 hours ago









Mohammad KholghiMohammad Kholghi

13811 bronze badges




13811 bronze badges








  • 1





    read is a bash builtin, not a command on its own. Find information about read in man bash ( manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html )

    – waltinator
    8 hours ago






  • 2





    As stated in a comment to a previous question of you this is explained. read is built into bash. There is no exectuable for that command.

    – PerlDuck
    8 hours ago






  • 1





    If you want to know syntax details about read, you can run the command help read. See the this link for more details

    – sudodus
    8 hours ago













  • echo is a built-in command, but it has an executable path. @waltinator @PerlDuck

    – Mohammad Kholghi
    8 hours ago








  • 1





    @waltinator You're right that bash's echo builtin isn't the same as the external command /bin/echo that, in Ubuntu, is provided by GNU coreutils. But both support escape sequences, and both interpret them when the -e option is passed and not otherwise. In general, on an arbitrary system with an arbitrary Bourne-style shell, one cannot be sure its echo builtin (if any!) and the external command (which is required to be present) behave in a largely similar fashion. But with bash and /bin/echo in Ubuntu and most other GNU/Linux systems, they do.

    – Eliah Kagan
    2 hours ago
















  • 1





    read is a bash builtin, not a command on its own. Find information about read in man bash ( manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html )

    – waltinator
    8 hours ago






  • 2





    As stated in a comment to a previous question of you this is explained. read is built into bash. There is no exectuable for that command.

    – PerlDuck
    8 hours ago






  • 1





    If you want to know syntax details about read, you can run the command help read. See the this link for more details

    – sudodus
    8 hours ago













  • echo is a built-in command, but it has an executable path. @waltinator @PerlDuck

    – Mohammad Kholghi
    8 hours ago








  • 1





    @waltinator You're right that bash's echo builtin isn't the same as the external command /bin/echo that, in Ubuntu, is provided by GNU coreutils. But both support escape sequences, and both interpret them when the -e option is passed and not otherwise. In general, on an arbitrary system with an arbitrary Bourne-style shell, one cannot be sure its echo builtin (if any!) and the external command (which is required to be present) behave in a largely similar fashion. But with bash and /bin/echo in Ubuntu and most other GNU/Linux systems, they do.

    – Eliah Kagan
    2 hours ago










1




1





read is a bash builtin, not a command on its own. Find information about read in man bash ( manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html )

– waltinator
8 hours ago





read is a bash builtin, not a command on its own. Find information about read in man bash ( manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html )

– waltinator
8 hours ago




2




2





As stated in a comment to a previous question of you this is explained. read is built into bash. There is no exectuable for that command.

– PerlDuck
8 hours ago





As stated in a comment to a previous question of you this is explained. read is built into bash. There is no exectuable for that command.

– PerlDuck
8 hours ago




1




1





If you want to know syntax details about read, you can run the command help read. See the this link for more details

– sudodus
8 hours ago







If you want to know syntax details about read, you can run the command help read. See the this link for more details

– sudodus
8 hours ago















echo is a built-in command, but it has an executable path. @waltinator @PerlDuck

– Mohammad Kholghi
8 hours ago







echo is a built-in command, but it has an executable path. @waltinator @PerlDuck

– Mohammad Kholghi
8 hours ago






1




1





@waltinator You're right that bash's echo builtin isn't the same as the external command /bin/echo that, in Ubuntu, is provided by GNU coreutils. But both support escape sequences, and both interpret them when the -e option is passed and not otherwise. In general, on an arbitrary system with an arbitrary Bourne-style shell, one cannot be sure its echo builtin (if any!) and the external command (which is required to be present) behave in a largely similar fashion. But with bash and /bin/echo in Ubuntu and most other GNU/Linux systems, they do.

– Eliah Kagan
2 hours ago







@waltinator You're right that bash's echo builtin isn't the same as the external command /bin/echo that, in Ubuntu, is provided by GNU coreutils. But both support escape sequences, and both interpret them when the -e option is passed and not otherwise. In general, on an arbitrary system with an arbitrary Bourne-style shell, one cannot be sure its echo builtin (if any!) and the external command (which is required to be present) behave in a largely similar fashion. But with bash and /bin/echo in Ubuntu and most other GNU/Linux systems, they do.

– Eliah Kagan
2 hours ago












1 Answer
1






active

oldest

votes


















5














read is a shell builtin, not an external command. which only tells you about external commands. Assuming you're using Bash (or some other Bourne-style shell), you should typically use type or command -v instead of which.



ek@Cord:~$ type read
read is a shell builtin


type and command are themselves shell builtins and they know not just about external commands but also about keywords, builtins, aliases, and functions. which is an external command that doesn't know about those things; it only knows about external commands. Sometimes which doesn't turn up anything when you ask it about a command that you can use in your shell. Sometimes it does turn up something for a command, but it isn't the same thing that actually runs when you use the command in your shell.



ek@Cord:~$ type type command which
type is a shell builtin
command is a shell builtin
which is /usr/bin/which


In Bash, you can see all the current possible meanings for a command, in the order that they are tried, with type -a:



ek@Cord:~$ type -a read
read is a shell builtin
ek@Cord:~$ type -a echo
echo is a shell builtin
echo is /bin/echo


For more information about why you usually shouldn't use which, and what to use instead in various shells including Bash, see Why not use “which”? What to use then?






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%2f1155273%2fwhere-is-read-command%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









    5














    read is a shell builtin, not an external command. which only tells you about external commands. Assuming you're using Bash (or some other Bourne-style shell), you should typically use type or command -v instead of which.



    ek@Cord:~$ type read
    read is a shell builtin


    type and command are themselves shell builtins and they know not just about external commands but also about keywords, builtins, aliases, and functions. which is an external command that doesn't know about those things; it only knows about external commands. Sometimes which doesn't turn up anything when you ask it about a command that you can use in your shell. Sometimes it does turn up something for a command, but it isn't the same thing that actually runs when you use the command in your shell.



    ek@Cord:~$ type type command which
    type is a shell builtin
    command is a shell builtin
    which is /usr/bin/which


    In Bash, you can see all the current possible meanings for a command, in the order that they are tried, with type -a:



    ek@Cord:~$ type -a read
    read is a shell builtin
    ek@Cord:~$ type -a echo
    echo is a shell builtin
    echo is /bin/echo


    For more information about why you usually shouldn't use which, and what to use instead in various shells including Bash, see Why not use “which”? What to use then?






    share|improve this answer




























      5














      read is a shell builtin, not an external command. which only tells you about external commands. Assuming you're using Bash (or some other Bourne-style shell), you should typically use type or command -v instead of which.



      ek@Cord:~$ type read
      read is a shell builtin


      type and command are themselves shell builtins and they know not just about external commands but also about keywords, builtins, aliases, and functions. which is an external command that doesn't know about those things; it only knows about external commands. Sometimes which doesn't turn up anything when you ask it about a command that you can use in your shell. Sometimes it does turn up something for a command, but it isn't the same thing that actually runs when you use the command in your shell.



      ek@Cord:~$ type type command which
      type is a shell builtin
      command is a shell builtin
      which is /usr/bin/which


      In Bash, you can see all the current possible meanings for a command, in the order that they are tried, with type -a:



      ek@Cord:~$ type -a read
      read is a shell builtin
      ek@Cord:~$ type -a echo
      echo is a shell builtin
      echo is /bin/echo


      For more information about why you usually shouldn't use which, and what to use instead in various shells including Bash, see Why not use “which”? What to use then?






      share|improve this answer


























        5












        5








        5







        read is a shell builtin, not an external command. which only tells you about external commands. Assuming you're using Bash (or some other Bourne-style shell), you should typically use type or command -v instead of which.



        ek@Cord:~$ type read
        read is a shell builtin


        type and command are themselves shell builtins and they know not just about external commands but also about keywords, builtins, aliases, and functions. which is an external command that doesn't know about those things; it only knows about external commands. Sometimes which doesn't turn up anything when you ask it about a command that you can use in your shell. Sometimes it does turn up something for a command, but it isn't the same thing that actually runs when you use the command in your shell.



        ek@Cord:~$ type type command which
        type is a shell builtin
        command is a shell builtin
        which is /usr/bin/which


        In Bash, you can see all the current possible meanings for a command, in the order that they are tried, with type -a:



        ek@Cord:~$ type -a read
        read is a shell builtin
        ek@Cord:~$ type -a echo
        echo is a shell builtin
        echo is /bin/echo


        For more information about why you usually shouldn't use which, and what to use instead in various shells including Bash, see Why not use “which”? What to use then?






        share|improve this answer













        read is a shell builtin, not an external command. which only tells you about external commands. Assuming you're using Bash (or some other Bourne-style shell), you should typically use type or command -v instead of which.



        ek@Cord:~$ type read
        read is a shell builtin


        type and command are themselves shell builtins and they know not just about external commands but also about keywords, builtins, aliases, and functions. which is an external command that doesn't know about those things; it only knows about external commands. Sometimes which doesn't turn up anything when you ask it about a command that you can use in your shell. Sometimes it does turn up something for a command, but it isn't the same thing that actually runs when you use the command in your shell.



        ek@Cord:~$ type type command which
        type is a shell builtin
        command is a shell builtin
        which is /usr/bin/which


        In Bash, you can see all the current possible meanings for a command, in the order that they are tried, with type -a:



        ek@Cord:~$ type -a read
        read is a shell builtin
        ek@Cord:~$ type -a echo
        echo is a shell builtin
        echo is /bin/echo


        For more information about why you usually shouldn't use which, and what to use instead in various shells including Bash, see Why not use “which”? What to use then?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 8 hours ago









        Eliah KaganEliah Kagan

        86k22 gold badges240 silver badges380 bronze badges




        86k22 gold badges240 silver badges380 bronze badges






























            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%2f1155273%2fwhere-is-read-command%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

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...