Mac终端命令输入过长是否不合适? [英] Mac terminal command input too long it does not fit?
本文介绍了Mac终端命令输入过长是否不合适?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要运行命令:
kubectl get pvc --field-selector metadata.name!=dataX********************************,******************************************************************,************************************************************************************************,************************************************************************************************,************************************************,*************************************************,***********************************************,*************************************************,***********************************************,*************************************************,***********************************************,************************************************,************************************************,*************************************************,***********************************************,*************************************************,dataY***********************************************,*************************************************,***********************************************,***************************************************,*********************************************,****************************************************,*******************************************,******************************************************,*****************************************,*******************************************************,****************************************,********************************************************,***************************************,*********************************************************,**************************************,**********************************************************,*************************************,***********************************************************,************************************,************************************************************,***********************************,************************************************************,***********************************,*************************************************************,***********************************,************************************************************,************************************,************************************************************,************************************,***********************************************************,*************************************,***********************************************************,*************************************,*************************************************************,***********************************,************************************************************,***********************************,*************************************************************,************************************,***********************************************************,*************************************,**********************************************************,**************************************,***********************************************************,************************************,************************************************************,***********************************,***********************************************************,************************************,*********************************************************,**************************************,********************************************************,***************************************,*******************************************************,***************************************,*******************************************************,*************************************,***********************************dataZ
但是,当我将其粘贴到mac终端中以运行时..它只会粘贴到:
however when I paste it in the mac terminal to run.. it only pastes till:
kubectl get pvc --field-selector metadata.name!=dataX********************************,******************************************************************,************************************************************************************************,************************************************************************************************,************************************************,*************************************************,***********************************************,*************************************************,***********************************************,*************************************************,***********************************************,************************************************,************************************************,*************************************************,***********************************************,*************************************************,dataY***********************************************,
我已经隐藏了实际的数据值..但是以dataX dataY和dataX为例...
I have hidden the actual data values.. but take the dataX dataY and dataX as examples...
-
整个命令总计536
whole command has total 536
仅粘贴185
现在我该如何容纳所有终端?
now how do I fit all the terminal?
推荐答案
您可以尝试使用脚本吗?
Can you try with script:
在脚本文件中写入命令.就像:test.sh
.
Write the command in a script file. like: test.sh
.
也许您还需要添加x
mod,以使其可执行.
只需运行命令来更改mod.
And may be you need to add x
mod also, to make it executable.
just run the command to change the mod.
chmod +x test.sh
步骤将如下所示:
-
nano test.sh
.
在脚本中添加命令.
chmod +x test.sh
.
运行./test.sh
test.sh
#!/usr/bin/env bash
kubectl get pvc --field-selector metadata.name!=dataX********************************,******************************************************************,************************************************************************************************,************************************************************************************************,************************************************,*************************************************,***********************************************,*************************************************,***********************************************,*************************************************,***********************************************,************************************************,************************************************,*************************************************,***********************************************,*************************************************,dataY***********************************************,*************************************************,***********************************************,***************************************************,*********************************************,****************************************************,*******************************************,******************************************************,*****************************************,*******************************************************,****************************************,********************************************************,***************************************,*********************************************************,**************************************,**********************************************************,*************************************,***********************************************************,************************************,************************************************************,***********************************,************************************************************,***********************************,*************************************************************,***********************************,************************************************************,************************************,************************************************************,************************************,***********************************************************,*************************************,***********************************************************,*************************************,*************************************************************,***********************************,************************************************************,***********************************,*************************************************************,************************************,***********************************************************,*************************************,**********************************************************,**************************************,***********************************************************,************************************,************************************************************,***********************************,***********************************************************,************************************,*********************************************************,**************************************,********************************************************,***************************************,*******************************************************,***************************************,*******************************************************,*************************************,***********************************dataZ
然后在CLI
中运行./test.sh
.
这篇关于Mac终端命令输入过长是否不合适?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文