
[实践OK]Centos8 Golang安装
Unix/LinuxC技术 jackxiang 2022-3-6 01:04
下载:
https://golang.google.cn/dl/go1.17.8.linux-amd64.tar.gz
完成之后解压到/usr/local
tar -C /usr/local -xzf go1.17.8.linux-amd64.tar.gz
打开环境变量文件
vi /etc/profile.d/golang.sh
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/root/go
export PATH=$PATH:$GOPATH/BIN
刷新环境变量
source /etc/profile.d/golang.sh
https://golang.google.cn/dl/go1.17.8.linux-amd64.tar.gz
完成之后解压到/usr/local
tar -C /usr/local -xzf go1.17.8.linux-amd64.tar.gz
打开环境变量文件
vi /etc/profile.d/golang.sh
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/root/go
export PATH=$PATH:$GOPATH/BIN
刷新环境变量
source /etc/profile.d/golang.sh
[实践OK]centos8yum源不可用解决,Module yaml error: Unexpected key in data: static_context
Unix/LinuxC技术 jackxiang 2022-3-6 00:48
Centos8 不在维护,第三方的镜像站中均已移除CentOS 8的源,yum install 会报错建议更换源。
备份旧的:
cd /etc/yum.repos.d/
mv CentOS-Base-aliyun-8.repo CentOS-Base-aliyun-8.repo.bak
mv CentOS-Base.repo CentOS-Base.repo.bak
下载新的:
wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
yum clean all && yum makecache
下载:
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
yum install -y epel-release
yum clean all
rpm --rebuilddb
yum update
yum list
yum makecache
来自:https://www.ngui.cc/article/show-390936.html
备份旧的:
cd /etc/yum.repos.d/
mv CentOS-Base-aliyun-8.repo CentOS-Base-aliyun-8.repo.bak
mv CentOS-Base.repo CentOS-Base.repo.bak
下载新的:
wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
yum clean all && yum makecache
下载:
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
yum install -y epel-release
yum clean all
rpm --rebuilddb
yum update
yum list
yum makecache
来自:https://www.ngui.cc/article/show-390936.html
curl -v -d'1)杰克。
2)杰克\r\n3)杰克东
3)你是谁 "a" "b"
[空行的空格全是下划]
4)jack ' x.xxxx.com
来自:https://blog.csdn.net/zhaozhi406/article/details/11131971
https://www.xknote.com/blog/1127037.html
2)杰克\r\n3)杰克东
3)你是谁 "a" "b"
[空行的空格全是下划]
4)jack ' x.xxxx.com
来自:https://blog.csdn.net/zhaozhi406/article/details/11131971
https://www.xknote.com/blog/1127037.html
[小众限速]Centos7限速和测速
Unix/LinuxC技术 jackxiang 2022-1-11 15:45
背景:有时你想测试一下传说中的微服务如熔断,服务器的接口超时(尤其是上传姑且叫大文件),这个rpm包应该是有用的。
限速
wondershaper是国外人开发的一款在Linux内核下基于TC工具的对整块网卡的限度工具。
第一种安装方法
首先下载wondershaper的rpm安装包:wondershaper-1.1a-7.noarch.rpm
安装wondershaper:
[root@localhost ~]# rpm -ivh wondershaper-1.1a-7.noarch.rpm
第二种安装方法
由于Centos7第三方库内才有这个软件,先安装第三方库
yum install epel-release -y
yum install wondershaper -y
限速命令:
第一个参数为网卡接口名,后面两个数字分别代表上行和下行的速度(单位Kb)
[root@localhost ~]# wondershaper eth0 5000 500
取消限速:
[root@localhost ~]# wondershaper clear eth0
来自:https://www.shuzhiduo.com/A/LPdo61bg53/
限速
wondershaper是国外人开发的一款在Linux内核下基于TC工具的对整块网卡的限度工具。
第一种安装方法
首先下载wondershaper的rpm安装包:wondershaper-1.1a-7.noarch.rpm
安装wondershaper:
[root@localhost ~]# rpm -ivh wondershaper-1.1a-7.noarch.rpm
第二种安装方法
由于Centos7第三方库内才有这个软件,先安装第三方库
yum install epel-release -y
yum install wondershaper -y
限速命令:
第一个参数为网卡接口名,后面两个数字分别代表上行和下行的速度(单位Kb)
[root@localhost ~]# wondershaper eth0 5000 500
取消限速:
[root@localhost ~]# wondershaper clear eth0
来自:https://www.shuzhiduo.com/A/LPdo61bg53/
[实践OK]Alfred 修改内置 Terminal 为 iTerm2
Unix/LinuxC技术 jackxiang 2021-12-10 16:06
Alfred是Mac下一个非常强大的工具,网上有许多如何使用的教程,我目前也只是会使用一些基本功能。其中一个我特别喜欢的功能就是直接可以在Alfred里面输入shell命令(默认需要在命令前家>符号,表示是shell命令),然后就会自动打开终端执行。但这里有个问题就是Alfred默认使用Mac自带的Terminal,而大多数在Mac经常使用终端的一般都会使用iTerm2,因为它配合zsh+oh my zsh,真的是非常强大。对于目前最新的iTerm 3.x版本,可以通过如下方法将Alfred内置的Terminal改为iTerm2:
打开Alfred的"Preferences->features->Terminal/shell",将"Application"选为"custom",然后将下面的编辑框中的脚本内容替换为下面的
需要注意的是不同的iTerm2版本脚本内容不太一样,该脚本适用于最新的iTerm2版本,即iTerm2 3.0.
实践来自:https://www.cxymm.net/article/qq_29855509/120960802
打开Alfred的"Preferences->features->Terminal/shell",将"Application"选为"custom",然后将下面的编辑框中的脚本内容替换为下面的
需要注意的是不同的iTerm2版本脚本内容不太一样,该脚本适用于最新的iTerm2版本,即iTerm2 3.0.
实践来自:https://www.cxymm.net/article/qq_29855509/120960802
sudo codesign --force --deep --sign - /Applications/PhotoScapeX.app
修复失败。
修复失败。
强制关掉一些进程后,方可使用zsh,发现有一个进程开了太多的进程:
ps -ef|grep UltraSearchSyste|wc -l
3594
zsh出现 :fork failed: resource temporarily unavailable,且启动不了程序了。
ps -ef|grep UltraSearchSyste|head -1
0 105 1 0 四05下午 ?? 9:44.65 /var/root/.UltraSearchSystem/UltraSearchSystemDaemon pd
0 98562 105 0 3:41下午 ?? 0:00.00 (UltraSearchSyste)
0 98569 105 0 9:05下午 ?? 0:00.00 (UltraSearchSyste)
开机启动位置,以为它是:
ls ~+/com.UltraSearchSystemDaemon.plist
cat ~+/com.UltraSearchSystemDaemon.plist
其实,它不是,是它,符合位置和pd参数:
/Library/LaunchDaemons/com.UltraSearchSystemP.plist
解决开机启动问题:
sudo rm -rf ~+/com.UltraSearchSystemP.plist
Password:
来自:
如何删除mac上的ultrasearchapp?
https://www.zhihu.com/question/400059869
再次参考:https://www.makeuseof.com/tag/hidden-launchdaemons-launchagents-mac/
来自:https://www.pcrisk.com/removal-guides/18893-ultrasearchsystem-adware-mac
ps -ef|grep UltraSearchSyste|wc -l
3594
zsh出现 :fork failed: resource temporarily unavailable,且启动不了程序了。
ps -ef|grep UltraSearchSyste|head -1
0 105 1 0 四05下午 ?? 9:44.65 /var/root/.UltraSearchSystem/UltraSearchSystemDaemon pd
0 98562 105 0 3:41下午 ?? 0:00.00 (UltraSearchSyste)
0 98569 105 0 9:05下午 ?? 0:00.00 (UltraSearchSyste)
开机启动位置,以为它是:
ls ~+/com.UltraSearchSystemDaemon.plist
cat ~+/com.UltraSearchSystemDaemon.plist
其实,它不是,是它,符合位置和pd参数:
/Library/LaunchDaemons/com.UltraSearchSystemP.plist
解决开机启动问题:
sudo rm -rf ~+/com.UltraSearchSystemP.plist
Password:
来自:
如何删除mac上的ultrasearchapp?
https://www.zhihu.com/question/400059869
再次参考:https://www.makeuseof.com/tag/hidden-launchdaemons-launchagents-mac/
来自:https://www.pcrisk.com/removal-guides/18893-ultrasearchsystem-adware-mac
执行命令:sudo su -
source ~/.zshrc
compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
出现:compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
解决办法:
vim /usr/local/share/zsh/site-functions/_brew_cask
来自:https://blog.csdn.net/shentian885/article/details/115902464
source ~/.zshrc
compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
出现:compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
解决办法:
vim /usr/local/share/zsh/site-functions/_brew_cask
来自:https://blog.csdn.net/shentian885/article/details/115902464
[实践OK]cat命令查看ps看不到的整个命令行和相关环境变量。
Unix/LinuxC技术 jackxiang 2021-6-25 10:40
ps只能看到部分:
root 3195 2205 0 Jun19 ? 00:00:13 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/0a8be205faf5aa1500e55e83e36a3027c626ae
cat查看:
#cat /proc/3195/cmdline
containerd-shim-namespacemoby-workdir/var/lib/containerd/io.containerd.runtime.v1.linux/moby/0a8be205faf5aa1500e55e83e36a3027c626aea234747a51c949ffb1a9f95c83-address/run/containerd/containerd.sock-containerd-binary/usr/bin/containerd-runtime-root/var/run/docker/runtime-runc-systemd-cgroup
二、执行程序的软链接:
#ls -lart /proc/3195/exe
lrwxrwxrwx 1 root root 0 Jun 25 10:06 /proc/3195/exe -> /usr/bin/containerd-shim
三、环境变量:
#cat /proc/3195/environ
LANG=en_US.UTF-8PATH=/opt/containerd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/binLD_LIBRARY_PATH=:/opt/containerd/libGOMAXPROCS=2
四、对应的fd编号:
#ls /proc/3195/fd
0 1 10 11 12 13 14 15 16 17 18 19 2 20 3 4 5 6 7 8 9
root 3195 2205 0 Jun19 ? 00:00:13 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/0a8be205faf5aa1500e55e83e36a3027c626ae
cat查看:
#cat /proc/3195/cmdline
containerd-shim-namespacemoby-workdir/var/lib/containerd/io.containerd.runtime.v1.linux/moby/0a8be205faf5aa1500e55e83e36a3027c626aea234747a51c949ffb1a9f95c83-address/run/containerd/containerd.sock-containerd-binary/usr/bin/containerd-runtime-root/var/run/docker/runtime-runc-systemd-cgroup
二、执行程序的软链接:
#ls -lart /proc/3195/exe
lrwxrwxrwx 1 root root 0 Jun 25 10:06 /proc/3195/exe -> /usr/bin/containerd-shim
三、环境变量:
#cat /proc/3195/environ
LANG=en_US.UTF-8PATH=/opt/containerd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/binLD_LIBRARY_PATH=:/opt/containerd/libGOMAXPROCS=2
四、对应的fd编号:
#ls /proc/3195/fd
0 1 10 11 12 13 14 15 16 17 18 19 2 20 3 4 5 6 7 8 9
[实践OK]Mac 上 Oh My Zsh 无法更新
Unix/LinuxC技术 jackxiang 2021-6-24 09:45
mac下面sudo su - 后出现:
sudo su
Password:
[Oh My Zsh] Would you like to update? [Y/n]: y
Updating Oh My Zsh
error: 不能变基式拉取:您有未暂存的变更。
error: 请提交或贮藏它们。
There was an error updating. Try again later?
最后我的解决办法是:
cd ~/.oh-my-zsh/
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
尚未暂存以备提交的变更:
(使用 "git add <文件>..." 更新要提交的内容)
(使用 "git restore <文件>..." 丢弃工作区的改动)
类型变更: plugins/fedora/fedora.plugin.zsh
类型变更: plugins/go/go.plugin.zsh
类型变更: plugins/gradle/_gradle
类型变更: plugins/gradle/_gradlew
类型变更: plugins/per-directory-history/per-directory-history.plugin.zsh
git reset --hard origin/master #强制让本地的代码和远端一致
HEAD 现在位于 08da19e3 emacs: revert cab1ac6e682038b2ceca9d16f8c458c0e79149ca (#7765)
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
git pull
remote: Enumerating objects: 9644, done.
root@bogon# upgrade_oh_my_zsh
Note: `upgrade_oh_my_zsh` is deprecated. Use `omz update` instead.
Updating Oh My Zsh
From https://github.com/ohmyzsh/ohmyzsh
* branch master -> FETCH_HEAD
Current branch master is up to date.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Oh My Zsh is already at the latest version.
To keep up with the latest news and updates, follow us on Twitter: https://twitter.com/ohmyzsh
Want to get involved in the community? Join our Discord: https://discord.gg/ohmyzsh
Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh
参考:https://www.chendalei.com/articles/2018/10/09/1539052284615.html
提示:
Updating Oh My Zsh
error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
There was an error updating. Try again later?
这种情况很可能发生,因为您已经在.oh-my-zsh目录中编辑了一些内容但尚未提交。
导航到该目录(.oh-my-zsh/目录)。
运行git status。 它应该显示已更改的文件列表。
使用git add暂存这些文件
使用git commit -m提交这些更改
你现在应该可以升级了。
可选:在步骤2之后,您可以运行git commit -a -m,它应该暂存所有未暂存的文件并提交这些更改(组合步骤3和4)。
然后通过upgrade_oh_my_zsh命令升级zsh。
参考来源:https://github.com/robbyrussell/oh-my-zsh/issues/1984
sudo su
Password:
[Oh My Zsh] Would you like to update? [Y/n]: y
Updating Oh My Zsh
error: 不能变基式拉取:您有未暂存的变更。
error: 请提交或贮藏它们。
There was an error updating. Try again later?
最后我的解决办法是:
cd ~/.oh-my-zsh/
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
尚未暂存以备提交的变更:
(使用 "git add <文件>..." 更新要提交的内容)
(使用 "git restore <文件>..." 丢弃工作区的改动)
类型变更: plugins/fedora/fedora.plugin.zsh
类型变更: plugins/go/go.plugin.zsh
类型变更: plugins/gradle/_gradle
类型变更: plugins/gradle/_gradlew
类型变更: plugins/per-directory-history/per-directory-history.plugin.zsh
git reset --hard origin/master #强制让本地的代码和远端一致
HEAD 现在位于 08da19e3 emacs: revert cab1ac6e682038b2ceca9d16f8c458c0e79149ca (#7765)
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
git pull
remote: Enumerating objects: 9644, done.
root@bogon# upgrade_oh_my_zsh
Note: `upgrade_oh_my_zsh` is deprecated. Use `omz update` instead.
Updating Oh My Zsh
From https://github.com/ohmyzsh/ohmyzsh
* branch master -> FETCH_HEAD
Current branch master is up to date.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Oh My Zsh is already at the latest version.
To keep up with the latest news and updates, follow us on Twitter: https://twitter.com/ohmyzsh
Want to get involved in the community? Join our Discord: https://discord.gg/ohmyzsh
Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh
参考:https://www.chendalei.com/articles/2018/10/09/1539052284615.html
提示:
Updating Oh My Zsh
error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
There was an error updating. Try again later?
这种情况很可能发生,因为您已经在.oh-my-zsh目录中编辑了一些内容但尚未提交。
导航到该目录(.oh-my-zsh/目录)。
运行git status。 它应该显示已更改的文件列表。
使用git add暂存这些文件
使用git commit -m提交这些更改
你现在应该可以升级了。
可选:在步骤2之后,您可以运行git commit -a -m,它应该暂存所有未暂存的文件并提交这些更改(组合步骤3和4)。
然后通过upgrade_oh_my_zsh命令升级zsh。
参考来源:https://github.com/robbyrussell/oh-my-zsh/issues/1984
解决办法:
下载VCRUNTIME140.dll文件;微软官网:下载地址:https://www.microsoft.com/en-us/download/details.aspx?id=52685
下载真实地址及名称:vc_redist.x64.exe
https://download.microsoft.com/download/0/6/4/064F84EA-D1DB-4EAA-9A5C-CC2F0FF6A638/vc_redist.x64.exe
下载VCRUNTIME140.dll文件;微软官网:下载地址:https://www.microsoft.com/en-us/download/details.aspx?id=52685
下载真实地址及名称:vc_redist.x64.exe
https://download.microsoft.com/download/0/6/4/064F84EA-D1DB-4EAA-9A5C-CC2F0FF6A638/vc_redist.x64.exe
[实践OK]C语言函数指针再学习。
Unix/LinuxC技术 jackxiang 2021-5-10 09:49
此次学习来源:https://mp.weixin.qq.com/s/YqZI4XUlsyPpaGIjy0pG3A
#cat p.c
#./p
value= 520
cat pp.c
#./pp
cat ppp.c
#./ppp
value0 = 1
value1 = 2
value2 = 3
temp[0] = 1
temp[1] = 2
temp[2] = 3
以前的学习:
https://jackxiang.com/post/7485/
#cat p.c
#./p
value= 520
cat pp.c
#./pp
cat ppp.c
#./ppp
value0 = 1
value1 = 2
value2 = 3
temp[0] = 1
temp[1] = 2
temp[2] = 3
以前的学习:
https://jackxiang.com/post/7485/
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
真实下载地址:https://download.oracle.com/otn/java/jdk/8u291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/jdk-8u291-macosx-x64.dmg
源码包下载地址:https://download.oracle.com/otn-pub/java/jdk/16.0.1+9/7147401fd7354114ac51ef3e1328291f/jdk-16.0.1_osx-x64_bin.tar.gz?AuthParam=1620358646_aa79aa4a7788c49057533e4b661b7f35
下载前的用户名密码:
https://jackxiang.com/post/6461/
来自:https://zhuanlan.zhihu.com/p/34915988
start.sh
真实下载地址:https://download.oracle.com/otn/java/jdk/8u291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/jdk-8u291-macosx-x64.dmg
源码包下载地址:https://download.oracle.com/otn-pub/java/jdk/16.0.1+9/7147401fd7354114ac51ef3e1328291f/jdk-16.0.1_osx-x64_bin.tar.gz?AuthParam=1620358646_aa79aa4a7788c49057533e4b661b7f35
下载前的用户名密码:
https://jackxiang.com/post/6461/
来自:https://zhuanlan.zhihu.com/p/34915988
start.sh
[实践OK]Centos8环境中配置PHP出现configure: error: Package requirements (oniguruma) were not met
Php/Js/Shell/Go jackxiang 2021-3-3 23:45
在Centos8环境中配置PHP出现如上报错:
原因是没有安装配置oniguruma导致的
解决方法如下:
1、获取源码,2.并解压
wget https://github.com/kkos/oniguruma/archive/v6.9.4.tar.gz -O oniguruma-6.9.4.tar.gz
tar -zxf oniguruma-6.9.4.tar.gz
cd oniguruma-6.9.4
备用下载: http://down.24kplus.com/linux/oniguruma/oniguruma-6.9.4.tar.gz
3、编译安装
./autogen.sh && ./configure --prefix=/usr
make && make install
如果是Centos7环境中的话:
解决方法如下:
yum -y install http://mirror.centos.org/centos-7/7.7.1908/cloud/x86_64/openstack-queens/oniguruma-6.7.0-1.el7.x86_64.rpm
yum -y install http://mirror.centos.org/centos-7/7.7.1908/cloud/x86_64/openstack-queens/oniguruma-devel-6.7.0-1.el7.x86_64.rpm
备用下载:
oniguruma:http://down.24kplus.com/linux/oniguruma/oniguruma-6.7.0-1.el7.x86_64.rpm
oniguruma-devel:http://down.24kplus.com/linux/oniguruma/oniguruma-devel-6.7.0-1.el7.x86_64.rpm
————————————————
版权声明:本文为CSDN博主「薄凉小伙」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Kangshuo2471781030/article/details/107241779
原因是没有安装配置oniguruma导致的
解决方法如下:
1、获取源码,2.并解压
wget https://github.com/kkos/oniguruma/archive/v6.9.4.tar.gz -O oniguruma-6.9.4.tar.gz
tar -zxf oniguruma-6.9.4.tar.gz
cd oniguruma-6.9.4
备用下载: http://down.24kplus.com/linux/oniguruma/oniguruma-6.9.4.tar.gz
3、编译安装
./autogen.sh && ./configure --prefix=/usr
make && make install
如果是Centos7环境中的话:
解决方法如下:
yum -y install http://mirror.centos.org/centos-7/7.7.1908/cloud/x86_64/openstack-queens/oniguruma-6.7.0-1.el7.x86_64.rpm
yum -y install http://mirror.centos.org/centos-7/7.7.1908/cloud/x86_64/openstack-queens/oniguruma-devel-6.7.0-1.el7.x86_64.rpm
备用下载:
oniguruma:http://down.24kplus.com/linux/oniguruma/oniguruma-6.7.0-1.el7.x86_64.rpm
oniguruma-devel:http://down.24kplus.com/linux/oniguruma/oniguruma-devel-6.7.0-1.el7.x86_64.rpm
————————————————
版权声明:本文为CSDN博主「薄凉小伙」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Kangshuo2471781030/article/details/107241779
[实践OK]python获取传入argv参数列表,以及字符为空判断,python退出之退出os._exit(-1)。
Php/Js/Shell/Go jackxiang 2021-2-23 17:43
python excelsearchKeyList.py k.txt
sys.argv[0] = excelsearchKeyList.py
sys.argv[1] = k.txt
二)判断字符为空:
python excelsearchKeyList.py k.txt
原创视频
line is null
line is null
三)判断是否传入新的参数:
来自:https://blog.csdn.net/index20001/article/details/74294945#:~:text=Python%E7%A8%8B%E5%BA%8F%E6%9C%89%E4%B8%A4%E7%A7%8D,%E8%A7%A3%E9%87%8A%E5%99%A8%E5%B0%86%E4%BC%9A%E9%80%80%E5%87%BA%E3%80%82
[实践OK]CentOS8下ssh登陆出现[error] character map file `UTF-8' not found: No such file or directory
Unix/LinuxC技术 jackxiang 2021-2-3 17:55
问题:
rpm -qa *langpack*
cat /etc/locale.conf
LC_ALL="zh_CN.utf8"
LC_CTYPE="zh_CN.utf8"
LANG="zh_CN.utf8"
解决办法:
yum install glibc-langpack-zh -y
rpm -qa *langpack*
cat /etc/locale.conf
LC_ALL="zh_CN.utf8"
LC_CTYPE="zh_CN.utf8"
LANG="zh_CN.utf8"
解决办法:
yum install glibc-langpack-zh -y