Day: March 20, 2018

Linux/Ubuntu: apt-cache命令的用法, apt-get apt-cache命令 使用

apt-get命令本身并不具有管理软件包功能,只是提供了一个软件包管理的命令行平台。 在这个平台上使用更丰富的子命令,完成具体的管理任务。 apt-get命令的一般语法格式为: apt-get subcommands [ -d | -f | -m | -q | --purge | --reinstall | - b | - s | - y | - u | - h | -v ] [pkg] apt-cache提供了搜索功能。 说明:下文命令中,尖括号中内容为用户视具体情况而定,如<pkg>可替换为实际的软件包名 mysql-server等。 1. 更新或升级操作: apt-get update

phpMyAdmin报错:Problem with phpMyAdmin and PHP 7.2: “Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable”

phpmyadmin报错: Some errors have been detected on the server! Please look at the bottom of this window. [Ignore All] [Ignore] This is the output when [users] table has been clicked: (but it shows the records at the top) this is found at the bottom===> `Notice in ./libraries/dbi/DBIMysqli.class.php#522 Undefined offset: 245 Backtrace ./libraries/Dat… Read More

Shell脚本:shell逻辑判断-三目运算符

在C语言中三目运算符的组成是 <表达式1>?<表达式2>:<表达式3>; 等同于C语言中的if语句 if (表达式1) 表达式2; else 表达式3; 而在bash shell 中也有类似的方式 echo $((2>1?2:1)) 但是這里 $(()) 只能进行数值大小的判断 使用command进行三目运算应该这样使用 command1 && command2 || command3 在shell中,很多人理解为下面的if语句 if command1;then command2 else command3 fi 这是错误的,原因是没有深刻理解&& 和 || 下面的命令很好的指出错误… Read More