Last change
on this file since 154 was
16,
checked in by rock, 17 years ago
|
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/ksh |
---|
2 | # IBM_PROLOG_BEGIN_TAG |
---|
3 | # This is an automatically generated prolog. |
---|
4 | # |
---|
5 | # |
---|
6 | # |
---|
7 | # Licensed Materials - Property of IBM |
---|
8 | # |
---|
9 | # (C) COPYRIGHT International Business Machines Corp. 2002,2004 |
---|
10 | # All Rights Reserved |
---|
11 | # |
---|
12 | # US Government Users Restricted Rights - Use, duplication or |
---|
13 | # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. |
---|
14 | # |
---|
15 | # IBM_PROLOG_END_TAG |
---|
16 | |
---|
17 | ############################################################################# |
---|
18 | # |
---|
19 | # Usage: tslistall <pathname> [<tmpdirname>] |
---|
20 | # |
---|
21 | ############################################################################# |
---|
22 | |
---|
23 | # Verify caller provided the pathname |
---|
24 | if [[ $# -lt 1 ]] |
---|
25 | then |
---|
26 | print -u2 "Usage: $0 pathname [<tmpdirname>]"; |
---|
27 | exit 1; |
---|
28 | fi |
---|
29 | path="$1" |
---|
30 | tmpdir=${2:-"/tmp"} |
---|
31 | |
---|
32 | # Generate a temporary file name |
---|
33 | |
---|
34 | tmpFile1="$tmpdir/tssave".$$."a" |
---|
35 | |
---|
36 | # Read the directory structure and sort it into the tmp file |
---|
37 | tsreaddir "$path" | sort -T "$tmpdir" > "$tmpFile1" || exit |
---|
38 | |
---|
39 | # Get the file's mtime/ctime and merge it with the file names |
---|
40 | # note: tab character between the quotes |
---|
41 | tstimes "$path" | join -t' ' - "$tmpFile1" |
---|
42 | |
---|
43 | # Save return code and delete the temp file before returning |
---|
44 | rc=$? |
---|
45 | rm -f "$tmpFile1" |
---|
46 | exit $rc |
---|
Note: See
TracBrowser
for help on using the repository browser.