无根的根:无名师的Unix心传(Rootless Root: The Unix Koans of Master Foo)补遗

Ma Kai posted @ Jan 16, 2011 04:40:29 AM in 胡说 , 3054 阅读

无名师与MCSE能者(Master Foo And the MCSE)

一通熟Windows之能者见无名师,曰:“闻师深修Unix之道,吾以密巧相述,相益,可乎?”

无名师曰:“求智,善矣;然Unix之道并无甚密巧。”

能者惑:“人曰师乃当世Unix大道之贤者,通晓其中之变法,如吾之于Windows;吾乃MCSE,有世所罕之证书,吾铭记各注册表项功能于心,更可细述任一Windows API,乃至微软所未曾详述者。师,所以为师,为智,皆揭而知他人之不知也。”

无名师曰:“怠矣,本无秘,何以揭?”

能者嗔:“若无密巧,何以修乃成师之业?”

无名师曰:“求智者,以他人之不知为智,犹如求光明者,拥烛笼火,以为珍贵,乃终被灼也。”

听此,能者顿觉灵光。

Master Foo and the MCSE

Once, a famous Windows system administrator came to Master Foo and asked him for instruction: “I have heard that you are a powerful Unix wizard. Let us trade secrets, that we may both gain thereby.”

Master Foo said: “It is good that you seek wisdom. But in the Way of Unix, there are no secrets.”

The administrator looked puzzled at this. “But it is said that you are a great Unix guru who knows all the innermost mysteries. As do I in Windows; I am an MCSE, and I have many other certifications of knowledge not common in the world. I know even the most obscure registry entries by heart. I can tell you everything about the Windows API, yes, even secrets those of Redmond have half-forgotten. What is the arcane lore that gives you your power?”

Master Foo said: “I have none. Nothing is hidden, nothing is revealed.”

Growing angry, the administrator said “Very well, if you hold no secrets, then tell me: what do I have to know to become as powerful in the Unix way as you?”

Master Foo said: “A man who mistakes secrets for knowledge is like a man who, seeking light, hugs a candle so closely that he smothers it and burns his hand.”

Upon hearing this, the administrator was enlightened.

转载自:http://blog.sinzy.net/jinjian/entry/22169

 

 

下面的都是自己翻译的,有误之处请指出:

无名师与命令行工具(Master Foo and the Shell Tools)

一Unix初学者谓无名师曰:“吾甚惑矣。此非Unix大道邪?程序皆应完成己职?”

师颔首。

此初学者又曰:“轮不可更之亦Unix之大道邪?”

师再颔首。

“然,于文本之处理有相同之物:sed、awk与Perl何也?于Unix大道孰可制成至佳?”

师问初学者曰:“若汝有一文本,何物汝用之生一副本替自尔之选之文本?”

初学者蹙眉曰:“Perl之正则对此甚简单,吾不知awk,吾将书一sed脚本。吾深通sed,斯时吾之愿矣。然若此职仅一次,而非重复,一文本之编辑器足矣。”

师颔首答曰:“汝饿而食,渴而饮,困而眠,与之同也。”

闻此,初学者顿觉灵光。

A Unix novice came to Master Foo and said: “I am confused. Is it not the Unix way that every program should concentrate on one thing and do it well?

Master Foo nodded.

The novice continued: “Isn't it also the Unix way that the wheel should not be reinvented?

Master Foo nodded again.

Why, then, are there several tools with similar capabilities in text processing: sed, awk and Perl? With which one can I best practice the Unix way?

Master Foo asked the novice: “If you have a text file, what tool would you use to produce a copy with a few words in it replaced by strings of your choosing?

The novice frowned and said: “Perl's regexps would be excessive for so simple a task. I do not know awk, and I have been writing sed scripts in the last few weeks. As I have some experience with sed, at the moment I would prefer it. But if the job only needed to be done once rather than repeatedly, a text editor would suffice.

Master Foo nodded and replied: “When you are hungry, eat; when you are thirsty, drink; when you are tired, sleep.

Upon hearing this, the novice was enlightened.

无名师与老手(Master Foo and the Old Hand)

一强Unix程序员,闻无名师之智,访而求教。至师前三鞠躬,曰:

“师,吾忐忑至深。吾幼,人皆追随Unix大道,其软件若ed,mailx之简明、无碍。今,其用vim与mutt。明,吾惧其欲用KMail与Evolution,Unix欲为Windows矣。其臃肿且图形之界面之多。”

师曰:“然汝欲制一海报,将用何物?”

程序员答曰:“吾未尝制之……然吾之于Unix大道之无用图形界面,而用LaTeX或图制之。”

师曰:“此二人谁人能及对岸:其一思一舟,其二行至一桥?”

闻此,程序员顿觉灵光。

An experienced Unix programmer, hearing of Master Foo's wisdom, came to him for guidance. Approaching the Master, he bowed three times and said:

Master Foo, I am gravely troubled. In my youth, those who followed the Great Way of Unix used software that was simple and unaffected, like ed and mailx. Today, they use vim and mutt. Tomorrow I fear they will use KMail and Evolution, and Unix will have become like Windows — bloated and covered over with GUIs.

Master Foo said: “But what software do you use when you want to draw a poster?

The programmer replied: “I...have never done that. But I am sure that I could use LaTeX or pic to accomplish it without GUIs, in the proper Unix way.

Master Foo then said: “Which one will reach the other side of the river: The one who dreams of a raft, or the one that hitchhikes to the next bridge?

Upon hearing this, the programmer was enlightened.

无名师与傻瓜新手(Master Foo and the Nervous Novice)

(虚位以待)

There was a novice who learned much at the Master's feet, but felt something to be missing. After meditating on his doubts for some time, he found the courage to approach Master Foo about his problem.

Master Foo,” he asked “why do Unix users not employ antivirus programs? And defragmentors? And malware cleaners?

Master Foo smiled, and said “When your house is well constructed, there is no need to add pillars to keep the roof in place.

The novice replied “Would it not be better to use these things anyway, just to be certain?

Master Foo reached for a nearby ball of string, and began wrapping it around the novice's feet.

What are you doing?” the novice asked in surprise.

Master Foo replied simply: “Tying your shoes.

Upon hearing this, the novice was enlightened.

无名师论返回Windows(Master Foo Discourses on Returning to Windows)

虚位以待

A student said: “We have learned that Unix is not just an operating system, but also a style of approaching problems.

Master Foo nodded in agreement.

The student continued: “Then, the Great Way of Unix can be applied on other operating systems?

Master Foo sat silent for a moment, then said: “In every operating system there is a path to the Great Way, if only we can find it.

The student continued: “What, then, of Windows? It is preinstalled on most computers, and though its tools are mostly far inferior, they are easy to use for beginners. Surely, Windows users could benefit from the Unix philosophy.

Master Foo nodded again.

The student said: “How, then, are those enlightened in the Unix Way to return to the Windows world?

Master Foo said: “To return to Windows, you have but to boot it up.

The student said, growing agitated: “Master Foo, if it is so easy, why are there so many monolithic and broken software packages for Windows? Elegant software should also be possible with a GUI and fancy colors, but there is little evidence that this occurs. What becomes of an enlighted one who returns to Windows?

Master Foo: “A broken mirror never reflects again; fallen flowers never go back to the old branches.

Upon hearing this, all present were enlightened.

 

  • 无匹配
  • 无匹配

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter