技术改变生活

博客园 首页 新随笔 联系 订阅 管理
上一页 1 2 3 4 5 6 ··· 17 下一页

2020年10月5日 #

摘要: awk是文本处理工具,功能小结如下: 1、条件表达式 [root@centos17 shell]# awk -F: '$3>1&&$3<3{print $0}' /etc/passwd daemon:x:2:2:daemon:/sbin:/sbin/nologin [root@centos17 sh 阅读全文
posted @ 2020-10-05 20:06 小阿峰 阅读(212) 评论(0) 推荐(0) 编辑

摘要: 阶乘计算 版本一: [root@centos17 shell]# sh -v factorial.sh #!/bin/bash factorial() { factorial1=1 for((i=1;i<=5;i++));do factorial1=$((factorial1*i)) done ec 阅读全文
posted @ 2020-10-05 19:28 小阿峰 阅读(145) 评论(0) 推荐(0) 编辑

摘要: #!/bin/bash 官方推荐写法 #/usr/bin/env bash 最好的写法 #!/usr/bin/bash #!/bin/sh #!/usr/sh 后三种写法,根据不同的linux版本,路径会有所改变导致程序无法识别。可以使用#/usr/bin/env bash来替代。 阅读全文
posted @ 2020-10-05 18:56 小阿峰 阅读(231) 评论(0) 推荐(0) 编辑

摘要: 关联数组 [root@centos17 shell]# cat shells_count.sh #!/bin/bash #login shell counts declare -A shells while read line do type=`echo $line|awk -F":" '{prin 阅读全文
posted @ 2020-10-05 11:09 小阿峰 阅读(249) 评论(0) 推荐(0) 编辑

2020年10月4日 #

摘要: 对于表达式来说:i++是先赋值再加1,++i是先加1再赋值 对于i变量本身来说:结果一样 测试结果如下: [root@centos17 ~]# unset a [root@centos17 ~]# unset b [root@centos17 ~]# echo $a [root@centos17 ~ 阅读全文
posted @ 2020-10-04 19:32 小阿峰 阅读(1109) 评论(0) 推荐(0) 编辑

摘要: shell数组变量: 普通数组:只能使用整数作为数组索引 关联数组:可以使用字符串作为数组索引 数组变量与普通变量对比: 普通变量:只能存储一个值 数组变量:可以存储多个值 例如: name=playgame 变量 |p |l |a |y |g |a |m |e |0 |1 |2 |3 |4 |5  阅读全文
posted @ 2020-10-04 18:43 小阿峰 阅读(150) 评论(0) 推荐(0) 编辑

2020年10月3日 #

摘要: 自定义变量,只在当前shell下生效。在编写脚本时,一般将公共的变量参数写到publish.sh脚本中,其他子功能的shell脚本,只需要执行. publish.sh 即可调用公共脚本里面定义的参数。所以,一般用不到环境变量。脚本变量调用关系如下图所示: 环境变量,在所有shell下都生效,可以在任 阅读全文
posted @ 2020-10-03 19:20 小阿峰 阅读(122) 评论(0) 推荐(0) 编辑

2020年9月22日 #

摘要: 方法一:sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.3.0 - Production on Wed Dec 15 10:54:03 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. 阅读全文
posted @ 2020-09-22 23:58 小阿峰 阅读(1306) 评论(0) 推荐(0) 编辑

摘要: centos7.4 oracle 11g server卸载 1、使用sqlplus 停止oracle数据库 sqlplus / as sysdba shutdown immediate exit 2、停止监听 lsnrctl stop 3、切换root账号(如果需要重新安装,可以不删除oracle账 阅读全文
posted @ 2020-09-22 22:14 小阿峰 阅读(288) 评论(0) 推荐(0) 编辑

2020年9月21日 #

摘要: 1、下载plsql,下载地址:https://www.allroundautomations.com/bodyplsqldevreg.html 2、选择product,找到对应版本plsql进行下载即可。 3、OCI配置:Configure > Preferences -- Oracle -- Co 阅读全文
posted @ 2020-09-21 00:36 小阿峰 阅读(790) 评论(0) 推荐(0) 编辑

2020年9月20日 #

摘要: 1、开始菜单,找到net configuration assistant工具 2、 3、 4、 5、选择通信协议:TCP,点击下一步 6、填写数据库所在的主机名(也可以是IP地址),选择端口号(根据数据库所在的主机的端口号进行选择,一般是标准端口号),点击下一步,选择测试,点击下一步 7、 8、 9 阅读全文
posted @ 2020-09-20 23:35 小阿峰 阅读(845) 评论(0) 推荐(0) 编辑

摘要: 下载地址:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html?ssSourceSiteId=otncn 需要登录账号,注册一个oracle账号即可。 阅读全文
posted @ 2020-09-20 22:08 小阿峰 阅读(1237) 评论(0) 推荐(0) 编辑

摘要: oracle安装完成后,激活scott用户alter user scott account unlock;然后报错:解决办法参考网址:oracle初次安装启动报错 SQL> select userenv('language') from dual; USERENV('LANGUAGE') AMERI 阅读全文
posted @ 2020-09-20 20:56 小阿峰 阅读(1211) 评论(0) 推荐(0) 编辑

2020年9月19日 #

摘要: ORA-01507: database not mounted 本人是初次安装oracle数据库,进入sqlplus后执行命令报错,提示database not mounted。借鉴百度大神,发现是Oracle的后台进程,使用kill -9 pid关闭重新startup即可。记录以备忘。 SQL> 阅读全文
posted @ 2020-09-19 23:57 小阿峰 阅读(201) 评论(0) 推荐(0) 编辑

摘要: 参考源文档:centos7 oracle11g静默安装 如下为本人亲验过程: oracle11g(11.2.0.1.0)安装文档 1、准备Centos 7的系统环境系统版本:CentOS Linux release 7.4.1708内核版本:3.10.0-693.el7.x86_64系统配置:1c, 阅读全文
posted @ 2020-09-19 23:15 小阿峰 阅读(236) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 17 下一页