After finishing the non alphanum php code I thought of doing the same with shellscripts. In the beginning I wasn't sure if it's possible but know I am able to say: It is :)
So lets jump into it. To begin with I built a ls command:
This is a regular expression, which I use to search in the / for the lost+found directory. This command will print all directories, which matches the regular expression, to the standard output.
This will assign to the variable __ the output of the last command . The full definition can be found here
3. . .;
Actually this command throws an error, I just used it to have a return value
This command saves the return value of . . in ___, which is 1. This will be used as the amount of chars we want to use.
Maybe you think this is wrong, because actually it should be
____=$___; But that would be boring. So we just save the string ___
This command stores 2 in ____. But wait, ____ just contains a string. This is true, but this command does a double variable expansion: ____ gets to ___ which expands to 1. (I didn't look it up why it does that).
Stores 3 in ____
I think its easier with the values:
The first block takes from postion 1 just 1 character which is a l.
The second block takes from position 3 just 1 character, which is s.
And thats how it works.