Help for this page

Select Code to Download


  1. or download this
    my   @lines = `list cm device all-properties`;
    my @matches = grep { /configsync-ip/ } @lines;
    chomp @matches; # Remove trailing newlines
    
  2. or download this
    my @matches = grep { /configsync-ip/ } `list cm device all-properties`
    +;
    chomp @matches;
    
  3. or download this
    for (@matches) {
        my (undef, $ip) = split /\s+/;
        ... # Your code to deal with the IP here.
    }
    
  4. or download this
    my @ips = map { (split /\s+/)[1] } 
             grep { /configsync-ip/ } `list cm device all-properties`;
    
  5. or download this
    use List::MoreUtils qw/:all/;
    
    ...
        # $addr is the first line, e.g.:  address 1.1.1.1/24
        # $allow_service is the 2nd line:   allow-service all 
    }