[BACK]Return to lsattr CVS log [TXT][DIR] Up to [Development] / xfs-cmds / irix / io

File: [Development] / xfs-cmds / irix / io / lsattr (download)

Revision 1.1, Fri Jan 14 04:58:04 2005 UTC (12 years, 9 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD

Merge IRIX build changes in, based on original grove2 variant.
Merge of master-melb:xfs-cmds:21155a by kenmcd.

#!/usr/bin/perl -w
use strict;

my $USAGE = "Usage: lsattr [-R|-D] file...\n";
my $OPTS = " ";
my @files;
my $dashdash = 0;

foreach (@ARGV) {
	if ($dashdash == 0) {
		if (/^--$/) {
			$dashdash = 1;
		} elsif (/^-[R|D]$/) {
			$OPTS = $OPTS . $_ . " ";
		} else {
			push @files, $_;
		}
	} else {
		push @files;
	}
}

if ($#files >= 0) {
	$, = ' ';
	`/usr/sbin/xfs_io -r -p lsattr -c "lsattr $OPTS" -- @files`;
} else {
	print STDERR $USAGE;
	exit 1;
}