Sponsored Content
Full Discussion: Is it a joke or a command?
Top Forums UNIX for Beginners Questions & Answers Is it a joke or a command? Post 303034683 by wisecracker on Thursday 2nd of May 2019 09:20:35 AM
Old 05-02-2019
Quote:
Originally Posted by baris35
Hello,
I have found some commands in a forum under "top ten unix commands" topic and I'd like to ask: what does below command do:
Could it really be a command or a joke?
Code:
:(){ :|:& };:

Thanks
Boris

If you consider : as True, NOP or Pass and use the 'True' meaning then I will rewrite in a method that is understandable.
Code:
# Create a function True(), ':()'.
True()
{
        # Call True ':' and Pipe '|' to itself True ':' in the Background '&'.
        True | True &
}
# Command separator ';', valid in shell scripts using a newline in its place.
# Call it.
True

 

We Also Found This Discussion For You

1. What is on Your Mind?

Post Your Favorite Joke! Laugh a Little!

Let's have a few laughs! Post your favorite joke! (no racist / racism jokes, please post in good taste, thanks!) (65 Replies)
Discussion started by: Neo
65 Replies
while(n)						       Tcl Built-In Commands							  while(n)

__________________________________________________________________________________________________________________________________________________

NAME
while - Execute script repeatedly as long as a condition is met SYNOPSIS
while test body _________________________________________________________________ DESCRIPTION
The while command evaluates test as an expression (in the same way that expr evaluates its argument). The value of the expression must a proper boolean value; if it is a true value then body is executed by passing it to the Tcl interpreter. Once body has been executed then test is evaluated again, and the process repeats until eventually test evaluates to a false boolean value. Continue commands may be exe- cuted inside body to terminate the current iteration of the loop, and break commands may be executed inside body to cause immediate termi- nation of the while command. The while command always returns an empty string. Note: test should almost always be enclosed in braces. If not, variable substitutions will be made before the while command starts execut- ing, which means that variable changes made by the loop body will not be considered in the expression. This is likely to result in an infinite loop. If test is enclosed in braces, variable substitutions are delayed until the expression is evaluated (before each loop iter- ation), so changes in the variables will be visible. For an example, try the following script with and without the braces around $x<10: set x 0 while {$x<10} { puts "x is $x" incr x } SEE ALSO
break(n), continue(n), for(n), foreach(n) KEYWORDS
boolean value, loop, test, while Tcl while(n)
All times are GMT -4. The time now is 02:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy