打印

[UNIX:SHELL]那里有UNIX脚本例子可以提供下载,学习的

[UNIX:SHELL]那里有UNIX脚本例子可以提供下载,学习的

最近看了一些SHELL方面的书,觉得挺soso,但我想真正脚本不是那样简单,书中脚本太稀松,恳请各位大虾指条名路,如何更好的学习脚本编程,那里有例子可以供下载学习的,先谢谢啦.
========================================================= 人比海里沙,毋用多牵挂,君可见漫天落霞,名利息间似雾化。 (支持论坛的发展,请点击论坛的广告) =========================================================

TOP

TOP

one way to learn writing shell scripts is to write them

here is an example you can try it.

given a range of IP's, loop thru them, ping each ip, spool the results to output file for log and analyses.  separate the alive ones from dead ones.  for the dead ones, try them again later after sleeping for a while.
for the alive ones, do something more fancier, do a reverse lookup, do a whois on them. do a figure on them, etc.

start simple, and exand a bit by bit.  think of different ways of doing the same thing.  also, try the script/commands on different platforms.  different ping gives different results for example.  i guarantee you by the time you are done, you will learn quite a few tricks.

another thing you can try is to write a script to analyze web log.  cut out each column and analyze them, sort them, etc, find out who is the top visitor, unique ip, which page is visited most, total bytes, etc.

personally, i found reading other people's scripts boring, unless i have to do it and get paid for it

good luck.
※※※※※※※※※※※※※※※在UNIX版发贴必读!否则关帖※※※※※※※※※※※※※※※ http://www.itpub.net/showthread.php?s=&threadid=38248

TOP

THANKS FENNG AND ORAMIND.
========================================================= 人比海里沙,毋用多牵挂,君可见漫天落霞,名利息间似雾化。 (支持论坛的发展,请点击论坛的广告) =========================================================

TOP

太客气了,一起学习吧:)

TOP


感谢一直以来您对我们的支持!
当前时区 GMT+8, 现在时间是 2008-8-30 01:24 京ICP证060528 号

Designed By 17DST