Shell脚本是否具有类似类型的python列表

时间:2018-08-09 13:07:17

标签: python linux bash shell

shell脚本是否具有类似的python列表类型,

Python脚本检查列表中找到的项目:

  list = ["one", "two", "three", "four"]

  if "one" in list:
      print "Yes, one item found in list"
  else:
      print "No, one item not found in list"

在Shell脚本中:

list =“一二三四”    如何检查Shell脚本中存在的“一个”键

0 个答案:

没有答案