0

Does shell script has similar type of python list,

Python script to check item found in the list:

  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"

In Shell script:

list="one two three four" How to check "one" key present in shell script

meteor23
  • 215
  • 1
  • 5
  • 11

0 Answers0