Questions tagged [interpreter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers

VS Code Won't Recognize R Installation

I installed R via the commands at this website. Running R in terminal works properly; running which R returns /usr/bin/R. VS code cannot find R despite the path for rterm and rpath being given ...
Samuel Nelson's user avatar
0 votes
1 answer

Does the shell script interpreter optimize if else chains?

As far as I understand, an interpreter runs code line by line; but I find probable that my reasoning is incorrect. If in this example case the first if line returns true, will the program know to skip ...
Hermitao's user avatar
-1 votes
1 answer

Is it correct to divide parsing into simple and complex? [closed]

I understand "field splitting" (or alternatively "word splitting") as a possible part of a broader process named parsing, while field splitting is done on parsing in various shells ...
variable_expander's user avatar
0 votes
2 answers

Why two or more read commands cannot be executed in one go (without some separation syntax)?

I tried to copy-paste the following two commands into the terminal directly and to then execute them: read -s x read -s y Current output is empty prompt but desired output is the first read execution ...
George's user avatar
  • 9
1 vote
3 answers

Switch the default shell by another interpreter

So I have some experience with linux and I was always wondering if it is possible to modify the terminal so that it executes a different interpreter (like python) rather than the default shell ...
Hamdi's user avatar
  • 13
0 votes
3 answers

bash line interpreting process

I would like to understand the exact process of line interpretation executed by bash. from GNU bash reference manual: When a simple command is executed, the shell performs the following expansions, ...
hutcruchi's user avatar
  • 309
2 votes
0 answers

How to trace script execution events

My goal: To receive events from the kernel when a file/script is opened for execution with the absolute path of the file (or maybe the working directory, to resolve the absolute path of the file). I ...
faraopera's user avatar
2 votes
1 answer

Why " >/dev/console" for remote beep (echo-command)

I've learned that this command: echo -e "\a" triggers a beep on the local system, whereas this command: echo -e "\a" >/dev/console triggers a beep on a remote system. Why is this? What is the &...
McErroneous's user avatar
4 votes
3 answers

Who runs the interpreter for files that are execute-only?

If the current user only has execute (--x) permissions on a file, under which user does the interpreter (specified by #!/path/to/interpreter at the beginning of the file) run? It couldn't be the ...
ATLief's user avatar
  • 290
0 votes
1 answer

What's the purpose of having "env [shell]" as an interpreter? [duplicate]

I already stumbled over #!/usr/bin/env bash on numerous occasions and never questioned it. Now, I'm wondering what the purpose of wrapping the shell interpreter in an env command, i.e. why not just ...
Kalle Richter's user avatar
7 votes
3 answers

Is parsing scripts at script-runtime ubiquitous to shells or present in other interpreters and how does that work?

I had always thought that shells parse whole scripts, constructing an AST, and then execute that AST from memory. However, I just read a comment by Stéphane Chazelas, and tested executing this script, ...
JoL's user avatar
  • 4,590
1 vote
1 answer

Building "cross linux system" programs, with different libc/musl interpreter

My goal is simple: I would like to create a program that bootstraps the nix package manager on any architecture, as a non-root user, with as few depends as possible. For now, what I did is the ...
tobiasBora's user avatar
  • 3,731
3 votes
2 answers

xslt shbang: Using xslt from the command line

I have (foolishly?) written a couple of moderately general-purpose xslt scripts. I'd quite like to turn these into executables that read an xml document from standard in or similar. The way you do ...
Att Righ's user avatar
  • 1,176
21 votes
6 answers

Choose interpreter after script start e.g. if/else inside hashbang

Is there any way to dynamically choose the interpreter that's executing a script? I have a script that I'm running on two different systems, and the interpreter I want to use is located in different ...
dkv's user avatar
  • 459
6 votes
6 answers

Run program at lower CPU speed?

It would be very useful for me to run specific programs in a Linux environment with a fixed (lower) CPU clock speed (say, runat 400mhz ./my-program --argument-of="my program" for getting that clock ...
mgarciaisaia's user avatar
6 votes
1 answer

Perl and Python wrongly interpreted via shebang on Linux

All my Python and Perl scripts are simply NOT iterpreted via shebang. Never. But they work as expected when I explicitly call the binary. I double checked my Perl and Python installations, it is ...
appzer0's user avatar
  • 63
4 votes
2 answers

Specifying a generic interpreter for a program like expect?

I am writing expect script which can be used on mulple operating systems but the problem is i can't use #!/usr/bin/expect evreywhere so instead i tried to do #!`which expect` at the top but it ...
munish's user avatar
  • 7,907
0 votes
2 answers

can something besides the shebang set the interpreter? [closed]

I'm running a script (in tmuxinator) that tries to source another script (rvm). rvm explicitly does not allow sourcing from sh. I didn't think that would be a problem, because the shebang in the ...
bgates's user avatar
  • 101
1 vote
3 answers

Is shebang always the same as the interpreter's installation directory?

Must the shebang header always match the interpreter's installation directory? If so, then why do both #!/usr/bin/python and #!/usr/local/bin/python work for me?
avimehenwal's user avatar