Tag Archives: linux

How to check if a variable is set in Bash?

where ${var+x} is a parameter expansion which evaluates to nothing if var is unset, and substitutes the string x otherwise. To check for non-null/non-zero string variable, i.e. if set, use It’s the opposite of -z. I find myself... Read More | Share it now!

差异两个rpms? – linux

尝试使用pkgdiff来查看RPM包之间的差异: 如果比较SRC.RPM,那么该工具也将提取并比较内部tarball(除非定义了-skip-subarchives选项). ... Read More | Share it now!

How can I pass artifacts to another stage?

Use dependencies. With this config test stage will download the untracked files that were created during the build stage: ... Read More | Share it now!

Linux 之 shell 比较运算符

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA... Read More | Share it now!

使用awk进行数字计算,保留指定位小数

https://blog.51cto.com/radish/1736900 对于在Shell中进行数字的计算,其实方法有很多,但是常用的方法都有其弱点: 1、bc     bc应该是最常用的Linux中计算器了,简单方便,支持浮点。     看似在简单计算时候完美的bc,其实也有一个让我抓狂的地方,当然有可能有办法可以解决,只是我不知道而已,那就是……... Read More | Share it now!

How do I measure request and response times at once using cURL?

From this brilliant blog post… https://blog.josephscott.org/2011/10/14/timing-details-with-curl/ cURL supports formatted output for the details of the request (see the cURL manpage for details, under -w, –write-out... Read More | Share it now!

Mount remote folder on Mac

Mount remote folder: Unmount remote folder: If Unmount failed for /mnt/localfolder: and kill the process using localfolder ... Read More | Share it now!

用 Touch ID 解锁 sudo 密码?一条命令就够了

https://zhuanlan.zhihu.com/p/31529925 前言 经常使用命令行的小伙伴一定对 sudo 命令不陌生,它可以以特定用户身份执行特定的命令。很多时候我们也会用它来执行系统管理命令。 但是,每次以非... Read More | Share it now!