Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash 当字符串被删除时如何使用cut命令=_Bash - Fatal编程技术网

Bash 当字符串被删除时如何使用cut命令=

Bash 当字符串被删除时如何使用cut命令=,bash,Bash,我有一个平面文件,里面有这样的条件密码=Y9=hj4jd。我想只显示password的值,所以我使用像cut-d=-f2这样的cut命令,但它只给出值Y9,而不是整个值。有人可以建议如何修改此字段吗?指定结束字段 cut ... -f2- 指定结束字段 cut ... -f2- grep-oP'^.*?=\K.*'sed's/[^=]*=/'grep-oP'^.*?=\K.*'sed's/[^=]*=/'

我有一个平面文件,里面有这样的条件密码=Y9=hj4jd。我想只显示password的值,所以我使用像cut-d=-f2这样的cut命令,但它只给出值Y9,而不是整个值。有人可以建议如何修改此字段吗?

指定结束字段

cut ... -f2-
指定结束字段

cut ... -f2-
grep-oP'^.*?=\K.*'sed's/[^=]*=/'grep-oP'^.*?=\K.*'sed's/[^=]*=/'