<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Date order Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/date-order/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/date-order/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:56:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Script to list the clients in descending access date order</title>
		<link>https://www.scmgalaxy.com/tutorials/a-script-to-list-the-clients-in-descending-access-date-order/</link>
					<comments>https://www.scmgalaxy.com/tutorials/a-script-to-list-the-clients-in-descending-access-date-order/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 24 Nov 2008 11:16:31 +0000</pubDate>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Clients]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[Date order]]></category>
		<category><![CDATA[Descending]]></category>
		<category><![CDATA[Descending access date order]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[Order]]></category>
		<category><![CDATA[Order date]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Script to list the clients in descending access]]></category>
		<category><![CDATA[Sort]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2008/11/24/a-script-to-list-the-clients-in-descending-access-date-order/</guid>

					<description><![CDATA[<p>&#160; Write a script to list the clients in descending access date order (for deleting obsolete clients). &#160; #!/usr/bin/ruby require [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/a-script-to-list-the-clients-in-descending-access-date-order/">Script to list the clients in descending access date order</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p align="left"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-3616 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2008/11/script-to-list-the-clients-.png" alt="script-to-list-the-clients-in-descending-access-date-order" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2008/11/script-to-list-the-clients-.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2008/11/script-to-list-the-clients--300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p align="left"><strong>Write a script to list the clients in descending access date order (for deleting obsolete clients).</strong></p>
<p>&nbsp;</p>
<p><span style="color: #800000;">#!/usr/bin/ruby<br />
require &#8220;P4&#8221;<br />
p4 = P4.new<br />
p4.tagged<br />
p4.connect<br />
clients = p4.run_clients.sort {|a,b| a[ &#8220;Access&#8221;].to_i &lt;=&gt; b[&#8220;Access&#8221;].to_i }<br />
clients[0&#8230;10].each do<br />
|c|<br />
stamp = Time.at( c[ &#8220;Access&#8221; ].to_i )<br />
printf( &#8220;%-20s %s\n&#8221;, c[ &#8220;client&#8221; ], stamp )<br />
end</span></p>
<p><strong>OR</strong></p>
<p><span style="color: #800000;">#!/usr/bin/perl<br />
use P4;<br />
my $p4 = new P4;<br />
$p4-&gt;Tag();<br />
$p4-&gt;Init() or die( &#8220;Failed to connect to Perforce&#8221; );<br />
my @clients = $p4-&gt;Clients();<br />
@clients = sort { $a-&gt;{ &#8220;Access&#8221; } &lt;=&gt; $b-&gt;{ &#8220;Access&#8221; } } @clients;<br />
@clients = @clients[ 0..9 ];<br />
foreach my $client ( @clients )<br />
{<br />
last unless defined( $client );<br />
my $stamp = localtime( $client-&gt;{ &#8220;Access&#8221; } );<br />
printf( &#8220;%-20s %s\n&#8221;, $client-&gt;{ &#8220;client&#8221; }, $stamp );<br />
}</span></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/a-script-to-list-the-clients-in-descending-access-date-order/">Script to list the clients in descending access date order</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/a-script-to-list-the-clients-in-descending-access-date-order/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
