public static List <String> interfaces_getNames()
        {
            var names   = new List <String>();
            var details = interfaces_getDetails();
            //return execute("interface show interface");
            var lines = StringsAndLists.fromTextGetLines(details);

            if (lines.Count > 3)
            {
                for (int i = 2; i < lines.Count; i++)
                {
                    var items = lines[i].Split(new string[] { "   " }, StringSplitOptions.RemoveEmptyEntries);
                    if (items.Length == 4)
                    {
                        names.Add(items[3].Trim());
                    }
                }
            }
            return(names);
        }
Esempio n. 2
0
 public static List <string> lines(this string targetString)
 {
     return(StringsAndLists.fromTextGetLines(targetString));
 }