文章浏览阅读1.9w次,点赞33次,收藏11次。错误案例import numpy as npa = np.array([1, 2, 3], [4, 5, 6])报错提示TypeError Traceback (most recent call last)~\AppData\Local\Temp/ipykernel_52444/3433848368.py in <module> 1 import numpy as n......
2024-01-24 00:08 阅读 阅读全文这里是因为if的默认输出为正常时就[ -z $com ]没有问题,当输出错误就少了[],加上就没有问题了脚本#!/bin/bashwhile :do read -p "请输入要执行的命令:" com if [ -z $com ];then exit fi $com &> /dev/null if [ $? == 0 ];then ......
2023-10-13 09:16 阅读 阅读全文