Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Multics
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Active functions === The Multics [[shell (computing)|shell]] language supports "active functions", which are similar to commands, but which return a string value. An active function is called by putting the active function name and the arguments to the active function in square brackets {{mono|[}} and {{mono|]}}. The string returned by the active function is substituted into the command in place of the call to the active function. For example, when the command {{mono|echo [working_dir]}} is processed, the active function {{mono|working_dir}} is run; it returns the full path of the [[working directory]], which is substituted into the command, so that the {{mono|echo}} command prints the working directory. Some programs can act either as commands or as active functions; when run as a command, its result is printed, and when run as an active function, its result is returned as a string.<ref name="multics-commands" /> Some common active functions are: * {{mono|[[Floor and ceiling functions|ceil]]}} - returns the smallest integer greater than or equal to the argument * {{mono|[[Floor and ceiling functions|floor]]}} - returns the largest integer less than or equal to the argument * {{mono|home_dir}} ({{mono|hd}}) - returns the [[home directory]] * {{mono|[[ltrim]]}} * {{mono|[[rtrim]]}} * {{mono|[[Truncation|trunc]]}} - returns the integer part of the argument * {{mono|working_dir}} ({{mono|wd}}) - returns the [[working directory]]
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Multics
(section)
Add topic