壳牌可变容量 [英] Shell Variable capacity

查看:51
本文介绍了壳牌可变容量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个 shell 脚本,其中有如下语句:

Suppose i have a shell script in which there is a statement like :

a=$(find / -type f)

这表示有一个特定的文件列表及其文件路径将存储在变量a"中.

This says there is a certain list of files with their file paths which will be stored in the variable 'a'.

它可以存储的最大限制或行数是多少.我如何找到它?

What is the maximum limit or number of lines that it can store. How do I find it?

推荐答案

IIRC,bash 对变量可以存储的数据量没有限制.然而,它受到 bash 执行环境的限制.请参阅此答案更全面的解释.

IIRC, bash does not impose a limit on how much data a variable can store. It is however limited by the environment that bash was executed under. See this answer for a more comprehensive explanation.

这篇关于壳牌可变容量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆