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?
Old story where computer expert digitally animates The Lord of the Rings
How should characters be punished for failing faction missions?
Is there any way for a Half-Orc Sorcerer to get proficiency with a heavy weapon?
Hiding A Solar System in a Nebula
When should we use dependency injection (C#)
No point shuffling, just pick your cards
How can I know (without going to the station) if RATP is offering the Anti Pollution tickets?
Use real text instead of lipsum in moderncv quote alignment
Does the North Korea Kim Jong Un have an heir?
How might boat designs change in order to allow them to be pulled by dragons?
Language Selector
What do you call the angle of the direction of an airplane?
What does the ash content of broken wheat really mean?
3D nonogram – What's going on?
Who are the police in Hong Kong?
Are there advantages in writing by hand over typing out a story?
"Best practices" for formulating MIPs
Auto replacement of characters
Are semivowels pronounced differently than vowels?
Show that there are infinitely more problems than we will ever be able to compute
A student "completes" 2-week project in 3 hours and lies about doing it himself
How to compute the number of centroids for K-means clustering algorithm given minimal distance?
How can I get a file's size with C++17?
Phrase origin: "You ain't got to go home but you got to get out of here."
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;
I wanted to find read command, so I did:
$ which read
It returns exit status 1. Why does this happen?
command-line
|
show 2 more comments
I wanted to find read command, so I did:
$ which read
It returns exit status 1. Why does this happen?
command-line
1
read
is abash
builtin, not a command on its own. Find information aboutread
inman 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 aboutread
, you can run the commandhelp read
. See the this link for more details
– sudodus
7 hours ago
echo
is a built-in command, but it has an executable path. @waltinator @PerlDuck
– Mohammad Kholghi
7 hours ago
@sudodus Thanks!
– Mohammad Kholghi
7 hours ago
|
show 2 more comments
I wanted to find read command, so I did:
$ which read
It returns exit status 1. Why does this happen?
command-line
I wanted to find read command, so I did:
$ which read
It returns exit status 1. Why does this happen?
command-line
command-line
asked 8 hours ago
Mohammad KholghiMohammad Kholghi
13311 bronze badges
13311 bronze badges
1
read
is abash
builtin, not a command on its own. Find information aboutread
inman 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 aboutread
, you can run the commandhelp read
. See the this link for more details
– sudodus
7 hours ago
echo
is a built-in command, but it has an executable path. @waltinator @PerlDuck
– Mohammad Kholghi
7 hours ago
@sudodus Thanks!
– Mohammad Kholghi
7 hours ago
|
show 2 more comments
1
read
is abash
builtin, not a command on its own. Find information aboutread
inman 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 aboutread
, you can run the commandhelp read
. See the this link for more details
– sudodus
7 hours ago
echo
is a built-in command, but it has an executable path. @waltinator @PerlDuck
– Mohammad Kholghi
7 hours ago
@sudodus Thanks!
– Mohammad Kholghi
7 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
7 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
7 hours ago
echo
is a built-in command, but it has an executable path. @waltinator @PerlDuck– Mohammad Kholghi
7 hours ago
echo
is a built-in command, but it has an executable path. @waltinator @PerlDuck– Mohammad Kholghi
7 hours ago
@sudodus Thanks!
– Mohammad Kholghi
7 hours ago
@sudodus Thanks!
– Mohammad Kholghi
7 hours ago
|
show 2 more comments
1 Answer
1
active
oldest
votes
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?
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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?
add a comment |
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?
add a comment |
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?
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?
answered 8 hours ago
Eliah KaganEliah Kagan
86k22 gold badges240 silver badges380 bronze badges
86k22 gold badges240 silver badges380 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
read
is abash
builtin, not a command on its own. Find information aboutread
inman 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 commandhelp read
. See the this link for more details– sudodus
7 hours ago
echo
is a built-in command, but it has an executable path. @waltinator @PerlDuck– Mohammad Kholghi
7 hours ago
@sudodus Thanks!
– Mohammad Kholghi
7 hours ago