码迷,mamicode.com
首页 >  
搜索关键字:bash    ( 15235个结果
SP2-0667/SP2-0750错误
错误:[oracle@ocmb11.2.0]$sqlplus/assysdbaError6initializingSQL*PlusSP2-0667:Messagefilesp1<lang>.msbnotfoundSP2-0750:YoumayneedtosetORACLE_HOMEtoyourOraclesoftwaredirectory原因:[oracle@ocmb~]$cat.bash_profile#.bash_profile#Getthealiasesandfunctionsi..
分类:其他好文   时间:2016-02-19 01:47:31    阅读次数:1982
bash脚本编程之算术运算
+,-,*,/, **, % 算术运算格式: (1) let VAR=算术运算表达式 (2) VAR=$[算术运算表达式] (3) VAR=$((算术运算表达式)) (4) VAR=$(expr $ARG1 $OP $ARG2) 注意:乘法符号在有些场景中需要使用转义符;
分类:其他好文   时间:2016-02-18 21:24:31    阅读次数:130
while数字死循环
#!/bin/bash while: do read-p"pleaseinputanumber:"n m=`echo$n|sed‘s/[0-9]//g‘` if[-z$m] then echo$n exit fi done#while死循环,直到输入正确数字退出
分类:其他好文   时间:2016-02-18 20:02:39    阅读次数:132
git使用
win10+VS2015 1. 安装Git-2.6.3-64-bit.exe 2. 远程已设置ssh 3.获取远程代码 p.s. "[*]"表示要替换的内容,"[]"这个不要不要的 打开要下载代码的路径,右键"git bash here" "git clone [ssh.url]" 显示“100%
分类:其他好文   时间:2016-02-18 17:59:36    阅读次数:152
history
centos6.5系统下,发现一个问题,history-c后,历史命令被清空,但退出CRT再登入时发现还有历史命令,这是什么情况呢?[root@localhost~]#find/-name*history#查找相关文件/root/.bash_history/usr/bin/ck-history/usr/share/doc/pam-1.1.1/txts/README.pam_pwhistory/var/lib/..
分类:其他好文   时间:2016-02-18 12:09:23    阅读次数:163
.bash_profile和.bashrc的区别(如何设置生效)
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置./etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.~/.bash
分类:其他好文   时间:2016-02-18 11:41:46    阅读次数:161
Linux Bash-vim
vim,Virtual Interface Improvement,是一个全屏化的模式化编辑的编辑器。 模式 编辑模式(命令模式): 输入模式: 末行模式: 模式转换 编辑模式->输入模式: i:在当前光标所在字符的前面转为输入模式。 a:在当前光标所在字符的后面转为输入模式。 o:在当前光标所在行
分类:系统相关   时间:2016-02-17 22:29:43    阅读次数:273
nodejs 写bash
nodejs也可以用来写bash。 一、写bash --> hello.js #! /usr/local/bin/node console.log('Hello'); 注意:这里hashbang是我在mac命令行下写的,要写node所在的位置。 兔哥的那个行不通,兔哥是这样写的 #! /usr/bi
分类:Web程序   时间:2016-02-17 22:12:34    阅读次数:220
shell脚本练习
1、把当前目录下的目录(只需要一级)列出来1#!/bin/bash 2forfin`ls` 3do 4if[-d$f] 5then 6echo$f 7fi 8done2、把当前目录下的文件(只需要一级)列出来1#!/bin/bash 2forfin`ls` 3do 4if[-f$f] 5then 6echo$f 7fi 8done[root@Linux9~]#date+%F"%T" 2016-02-1715:54:13知识点..
分类:系统相关   时间:2016-02-17 19:29:19    阅读次数:209
if判断的几种用法
if判断语句1:#!/bin/bash read-p"pleaseinputanumber:"n m=`echo$n|sed‘s/[0-9]//g‘` if[-z$m] then echo$n else echo"pleaseinputvalidnumber." fiif判断语句2:1#!/bin/bash2read-p"pleaseinputanumber:"n3m=`echo$n|sed‘s/[0-9]//g‘`4if[-n"$m"]5then6echo"pleaseinputvali..
分类:其他好文   时间:2016-02-17 19:19:23    阅读次数:266
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!