码迷,mamicode.com
首页 >  
搜索关键字:bash 端口检测    ( 15273个结果
shell脚本解析9(练习3)------倒序输出
#!/bin/bash#提示用户输入echo -n "Please enter number"read n #读入输入的值放到变量n中sd=0rev=""on=$n #将变量n的值保存到变量on中,方便以后用到echo "You put number is $n"while [$n -gt 0]do...
分类:其他好文   时间:2014-07-16 23:03:53    阅读次数:261
shell脚本解析10(练习4)------监视文件
#!/bin/bash #判断命令行是否代带有两个文件名的参数 if [ "$1" = "" ] || [ "$2" = "" ] then echo "Please enter file name" exit 1 fi #判断目标文件是否存在 if [ -e $2 ] then echo "...
分类:其他好文   时间:2014-07-16 22:59:29    阅读次数:153
bash/shell 数学计算
$ echo $((20.0/7))$ zcalc$ bc <<< 20+5/2$ bc <<< 'scale=4;20+5/2'$ expr 20 + 5$ calc 2 + 4$ node -pe 20+5/2 # Uses the power of JavaScript, e.g. : no....
分类:其他好文   时间:2014-07-16 22:53:27    阅读次数:184
go on shell
shell bash 是linux系统最常用的脚本,在其里面可以写上grep sed awk等常用命令用到grep那么就要想到正则开头是小写字母的那一行就列出grep -n '^[a-z]'oo前不能是小写字母grep -n '[^a-z]oo'不想要开头是英文字母grep -n '^[^a-zA-...
分类:其他好文   时间:2014-07-16 20:23:02    阅读次数:163
Generating SSH Keys on windows
two ways here I provide:+ use openSSH command line on git bash(such as msysgit bash) + ls -al ~/.ssh + ssh-keygen -t rsa -C "phpgcs@qq.com" + e...
分类:Windows程序   时间:2014-07-16 19:54:04    阅读次数:255
Linux学习5
我所用的Ubuntu自带的shell是bash。 1.bash中的引号 ‘:(单引号) 强引用 是什么就输出什么 “;(双引号) 弱引用 会进行变量替换 ·;(反引号) 命令替换 2.echo -n 不换行 -e 会将\t , \n转义后输出 echo "hello\tw...
分类:系统相关   时间:2014-07-16 19:33:17    阅读次数:287
Linux添加环境变量与GCC编译器添加INCLUDE与LIB环境变量
对所有用户有效在/etc/profile增加以下内容。只对当前用户有效在Home目录下的.bashrc或.bash_profile里增加下面的内容:(注意:等号前面不要加空格,否则可能出现 command not found)#在PATH中找到可执行文件程序的路径。export PATH =$PAT...
分类:系统相关   时间:2014-07-13 12:23:21    阅读次数:295
linux安装redis
关于redis是什么就不介绍了,安装过程参考了:http://www.cnblogs.com/silent2012/p/3499654.html。#!/bin/bash#定义安装目录export REDIS_HOME=/home/test/redis#创建安装目录mkdir $REDIS_HOME#...
分类:系统相关   时间:2014-07-12 13:30:20    阅读次数:315
linux下使profile和.bash_profile立即生效的方法
使profile生效的方法1.source/etc/profile使用.bash_profile生效的方法1..bash_profile2source.bash_profile3execbash--login
分类:系统相关   时间:2014-07-10 19:19:08    阅读次数:214
关于bash的配置文件加载
bash的配置文件分为两类全局配置/etc/profile/etc/profile.d/*.sh/etc/bashrc个人配置~/.bash_profile~/.bashrcprofile类的配置:设定环境变量;运行命令或脚本bashrc类的配置:设定本地变量;定义命令别名登录式shell如何读取配置文件(通过本地命令行或远程终端登录;su-usern..
分类:其他好文   时间:2014-07-10 17:59:21    阅读次数:243
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!