Skip to main content

Questions tagged [shell-builtin]

A shell builtin is a command called from a shell, that is executed directly in the shell itself.

5 votes
2 answers
571 views

If I enter pwd foo bar at the prompt of the bash shell, the foo bar part of the command line seems to be completely ignored. If I enter exit 0 foo, I get bash: exit: too many arguments. So pwd ignored ...
Enlico's user avatar
  • 2,362
-5 votes
1 answer
99 views

The bash' command source has been modified in one of few ways: alias function overriding or else Then how can its synonym: . got being so too (problem is it's not letter) ?
user17227456's user avatar
0 votes
2 answers
106 views

When timing a command with time, there is inevitably some overhead (from the CPU, operating system, shell and so on). Running the following code, from a tty text mode virtual console with all ...
Markus Klyver's user avatar
2 votes
1 answer
207 views

I have the following (excerpt from a) zsh shell script (the FOLDER environment variable is exported earlier in the code): # Create temporary directory export TMPDIR=$(mktemp -d) # Set TIMEFMT to ...
Markus Klyver's user avatar
0 votes
0 answers
35 views

I wanted to use tee /dev/tty to look into the stream passing through a pipeline. While making some tests, I observed the following: ~$ cd /proc/self/fd /proc/self/fd$ ls 0 1 2 255 # Ok /proc/self/...
The Quark's user avatar
  • 454
2 votes
4 answers
1k views

I am trying to better understand printf so I read multiple pages on this command, but I also stumbled upon different behavior of %q directive. Namely, stated on this page: What is the difference ...
Vlastimil Burián's user avatar
4 votes
0 answers
114 views

Why does echo "$(fc -l -1)" show the previous command, but echo "$(fc -l -1 | cat)" show the current command? $ testfc () { > echo "$(fc -l -1)" > echo &...
Jacktose's user avatar
  • 532
-2 votes
2 answers
348 views

I was plodding along, working on a shell script, and I've just learned something that I found surprising. I'm presenting it here as a Question because I'd like to learn if there's some way to avoid ...
Seamus's user avatar
  • 3,928
3 votes
1 answer
366 views

I am trying to add this to my ~/.bashrc and test for some commands, that already have aliases. command -pv <command> but it seems like the -p option that is supposed to force a path search is ...
Jore's user avatar
  • 143
1 vote
0 answers
189 views

I'm writing a script that I run directly, "source" from the bash console, or cut/paste as a sequence of commands into a console from an editor window. The script or its pasted commands may ...
Russ's user avatar
  • 159
0 votes
1 answer
196 views

UPDATE Once again, I can't post an answer to my question! Clicking the button just triggers an error message: "Unable to load popup - please try again". So, I have no other choice than to ...
futurewave's user avatar
1 vote
2 answers
316 views

mapfile -t -u 7 arr < textfile gives me bash: mapfile: 7: invalid file descriptor: Bad file descriptor Other, more verbose, methods of reading files line-by-line do allow for such descriptor, e.g. ...
John Smith's user avatar
1 vote
2 answers
288 views

I want to execute all commands within my script with command -p e.g.: command -p pwd Because there may be some command that I will execute within the script whose name is being used by some other ...
rhuanpk's user avatar
  • 413
-1 votes
1 answer
290 views

I defined the following as read-only: readonly root_command='sudo -s' later used in my script as in: exec $root_command My question is, maybe I am slow or something, but I do not fully understand ...
Vlastimil Burián's user avatar
1 vote
2 answers
186 views

Please forgive my basic unix/linux scripting skill and poor English I am testing a script in the Linux VM, let's say it is work.sh. So I have to ssh to the VM ssh [email protected] with my ...
Dreamer's user avatar
  • 115

15 30 50 per page
1
2 3 4 5
12