What "rc" stands for?
rc stands for "runtime commands" if you wondered ... traditional, these are configuration files read by applications as they start up at run time - options not compiled into the executable.
Files with names starting with a period (.) are silent or hidden files on Unix or Linux systems, only shown if you use an option such as -a to your ls command. They will not be matched if you start an operating system command with a * (you must be specific about the .) or Perl's glob function, but they will be returned to you by readdir.
What "#!" is called?
In computing, a shebang (also called a hashbang, hashpling, or pound bang) refers to a pair of characters "#!" that, when used as the first two characters on the first line of a script, causes Unix-like operating systems to execute that script using the interpreter specified by the rest of that line.
The name shebang comes from an inexact contraction of SHArp bang or haSH bang, referring to the two typical Unix names of the two characters. Unix jargon uses sharp or hash to refer to the number sign character and bang to refer to the exclamation point, hence shebang. Another theory on sh in shebang's name is from default shell sh, usually invoked with shebang.
Portability: While many common shebangs use system executables which have fairly standard paths, it is quite possible for different variants of even the same operating system to have different locations for the desired interpreter.
In the absence of rigidly standardised locations for each interpreter, the shebang would on some systems try to execute something that doesn't exist where the shebang says it is. Shebangs can therefore limit the portability of the file.
The generalized one will be like:
#!/usr/bin/env perl # for perl interpreter
#!/usr/bin/env python # for python interpreter
Why we need shebang like above(say with /usr/bin/env)? Why don't we put directly the interpreter path itself?
When user specifies, #!/usr/bin/env then it increases the portability of the program and the professionalism.
Let us say, if you move from Linux distro to BSD you will see bash is located at /usr/local/bin/bash OR to Solaris you will see bash at /opt or some other location. Instead of adjusting all the location admin can create a /usr/bin/env softlink and problem solved. Just imagine you have 100s of shell and perl scripts…
This is not just about Linux. It is about running a script under different UNIX like oses.
what is quine(computing)
In computing, a quine is a program, a form of metaprogram, that produces its complete source code as its only output. For amusement, programmers sometimes attempt to develop the shortest possible quine in any given programming language.
Note that programs which take input are not considered quines. This would allow the source code to be fed to the program via keyboard input, opening the source file of the program, and similar mechanisms. Also, a quine which contains no code is ruled out as trivial; in many programming languages executing such a program will output the code (i.e. nothing). Such an empty program once won the "worst abuse of the rules" prize in the http://en.wikipedia.org/wiki/Obfuscated_C contest.
Third question goes here
Third answer goes here
Comments (0)
You don't have permission to comment on this page.