LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 886|回复: 4

.bash_history 看不懂。[基本解决]

[复制链接]
发表于 2004-2-13 18:16:30 | 显示全部楼层 |阅读模式
兄弟们给注解一下,谢谢了 :thank

cd /www/
ls **/index.html
pwd
for file in *; do if ! [ -f $file/index.html ] then echo $file; fi; done
for file in *; do if ! [ -f $file/index.html ] then echo $file; endif; done
for file in *; do if ! [ -f $file/index.html ] then echo $file; endif; done
for file in *; do if ! [ -f $file/index.html ]; then echo $file; endif; done
for file in *; do if ! [ -f $file/index.html ]; then echo $file; endif; endif; endif;
for file in *; do if ! [ -f $file/index.html ]; then echo $file; else echo "Okay"; done
for file in *; do if ! [ -f $file/index.html ]; then echo $file; else echo "Okay"; endif; done
for file in *; do if ! [ -f $file/index.html ] then; do echo $file; else echo "Okay"; endif; done
for file in *; do if ! [ -f $file/index.html ] then; echo $file; else echo "Okay"; endif; done
for file in *; do if ! [ -f $file/index.html ] then; echo $file; endif; done
for file in *; do if ! [ -f $file/index.html ] echo $file; endif; done
for file in *; do if ! [ -f $file/index.html ] then echo $file; endif; done
ls * | perl -anle 'print $F[1] if (!-f $f[1]."/index.html")'
ls * | perl -anle 'print $F[1] if (!-f $F[1]."/index.html")'
ls | perl -anle 'print $F[1] if (!-f $F[1]."/index.html")'
ls | perl -nle 'print if (!-f $_."/index.html")'


perl -e '($domain) = ("http://who.knows.what.thefuck.co.uk/blah/baskdkasd/hblah.html" =~ m|https?://([a-zA-Z0-9\.\-\_]+).*|); print $domain,"\n"'
ls nailb.com/
perl -e '($domain) = ("http://who.knows.what.thefuck.co.uk" =~ m|https?://([a-zA-Z0-9\.\-\_]+).*|); print $domain,"\n"'
perl -e '($domain) = ("http://asdf.com/asdf/is/a/cool/site/../../../../../../../setup.exe" =~ m|https?://([a-zA-Z0-9\.\-\_]+).*|); print $domain,"\n"'
ls | perl -nle 'print if ((!-f $_."/index.html") && (!-f $_."/index.htm") && (!-f $_."/index.php"))'
ls | perl -nle 'print if ((!-f $_."/index.html") && (!-f $_."/index.htm") && (!-f $_."/index.php"))' | grep -E 'com$|biz$|net$
:help
发表于 2004-2-13 18:24:47 | 显示全部楼层
.bash_history是历史记录中的命令,在/etc/profile中指定他的文件位置和记录数量的多少,如
HISTFILE=~/.bash_history
HISTSIZE=100
你贴的都是都你你上此登录后键入的命令.
 楼主| 发表于 2004-2-13 18:48:21 | 显示全部楼层
j兄误解了。我知道是命令记录。只是是我看到的,而不是我登录后的记录。
我想知道的是每条记录的含义或是这个命令的目的。
 楼主| 发表于 2004-2-13 18:49:26 | 显示全部楼层
such as this one:
ls | perl -nle 'print if ((!-f $_."/index.html") && (!-f $_."/index.htm") && (!-f $_."/index.php"))' | grep -E 'com$|biz$|net$
发表于 2004-2-13 19:04:52 | 显示全部楼层
最初由 hzqe 发表
such as this one:
ls | perl -nle 'print if ((!-f $_."/index.html") && (!-f $_."/index.htm") && (!-f $_."/index.php"))' | grep -E 'com$|biz$|net$

哦~~,原来是这样意思呀~~,
perl的问题可以到perl讨论区看看:
http://www.linuxsir.cn/bbs/forumdisplay.php?forumid=77
别的都是shell交互试的脚本,
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表