![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| What's on Your Mind? Come inside and relax a while. Maybe play a few Video Arcade Games if you have free time. |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Who are we?
I am curious who we are, how did we come to unix/linux and what/why do we use unix?
1. I am aerospace engineer 2. I am from Seattle WA USA 3. I first came to unix though work 4. I have duel pc/linux sys at home but mostly just remote into my companies system 5. I do unix all day at work, I am not able to do anything with data by hand, I will always script it 6. I love unix because it takes the mystery out of computers In a world where people still think the “mouse” was a step forward I just want to know who else understands the beauty of the following one liner, do you have a oneliner too? Code:
echo prime | awk '{p[++i]=2;for(j=1;++j<100000000;++l)for(n=0;j%p[++n];++k)if((j/p[n])<(p[n])){p[++i]=j;print j;break}}'
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Can't say that I have ever seem prime number identification done in an awk oneliner before!
|
|
#3
|
|||
|
|||
|
you can cram a long program into one line too.
|
|
#4
|
|||
|
|||
|
awk has double precision arithmetic operations, so you are limited to DBL_DIG precision - see your /usr/include/limits.h for more information....
|
|||
| Google The UNIX and Linux Forums |