File: get_used_vars.lua

package info (click to toggle)
lua5.1-policy 33
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 140 kB
  • ctags: 16
  • sloc: sh: 45; ansic: 42; makefile: 30
file content (5 lines) | stat: -rw-r--r-- 159 bytes parent folder | download | duplicates (9)
1
2
3
4
5
f = io.open("policy.txt")
data = f:read("*all")
vars = {}
string.gsub(data,"{[A-Z_]*}",function (s) vars[s] = true end)
for k,v in pairs(vars) do print(k) end