local M = {}

function M.lower(a, b)
  if a > b then return b else return a end
end

function M.tablelength(T)
  local c = 0
  for _ in pairs(T) do c = c + 1 end
  return c
end

function M.cmdcontent(cmd)
  local b = {}
  local a = io.popen(cmd, 'r')
  if a == nil then return end
  for _ in a:lines() do table.insert(b, _) end
  a:close()
  return b
end

return M