perl 3.0 patch #22 patch #19, continued
[p5sagit/p5-mst-13.2.git] / eg / changes
CommitLineData
378cc40b 1#!/usr/bin/perl -P
2
a687059c 3# $Header: changes,v 3.0 89/10/18 15:13:23 lwall Locked $
378cc40b 4
5($dir, $days) = @ARGV;
6$dir = '/' if $dir eq '';
7$days = '14' if $days eq '';
8
9# Masscomps do things differently from Suns
10
11#if defined(mc300) || defined(mc500) || defined(mc700)
12open(Find, "find $dir -mtime -$days -print |") ||
13 die "changes: can't run find";
14#else
15open(Find, "find $dir \\( -fstype nfs -prune \\) -o -mtime -$days -ls |") ||
16 die "changes: can't run find";
17#endif
18
19while (<Find>) {
20
21#if defined(mc300) || defined(mc500) || defined(mc700)
22 $x = `/bin/ls -ild $_`;
23 $_ = $x;
24 ($inode,$perm,$links,$owner,$group,$size,$month,$day,$time,$name)
25 = split(' ');
26#else
27 ($inode,$blocks,$perm,$links,$owner,$group,$size,$month,$day,$time,$name)
28 = split(' ');
29#endif
30
31 printf("%10s%3s %-8s %-8s%9s %3s %2s %s\n",
32 $perm,$links,$owner,$group,$size,$month,$day,$name);
33}
34