Script to list the clients in descending access date order
Write a script to list the clients in descending access date order (for deleting obsolete clients). #!/usr/bin/ruby require “P4” p4 = P4.new p4.tagged p4.connect clients = p4.run_clients.sort {|a,b| a[ “Access”].to_i <=> b[“Access”].to_i } clients[0…10].each do |c| stamp = Time.at( c[ “Access” ].to_i ) printf( “%-20s %s\n”, c[ “client” ], stamp ) end OR … Read more