brief acct, group, user, dir listings
LG, LU, LA and LD scripts:
- PARM group=@ LGlistgroup !group; format=brief
- PARM user=@ LUlistuser !user; format=brief
- PARM acct=@ LAlistacct !acct; format=brief
- PARM dir=./@ LDsetvar _dir !dirif delimpos(_dir, ./) <> 1 then # convert MPE name to POSIX name setvar _dir dirname( fqualify(_dir)) + / + basename(_dir)endif listfile !_dir, 6; seleq=[object=HFSDIR]; tree
Notes:
- The last example (LD) shows the BASENAME, DELIMPOS, DIRNAME and FQUALIFY functions being used.
- DELIMPOS(_dir, ./) <> 1 tests if the directory name in _dir starts with a dot or slash, and thus is a POSIX named directory. The FSYNTAX function could have been used for this purpose too.
- An MPE name can be converted to a POSIX name easily:
- DIRNAME returns the directory portion, in POSIX syntax, of a filename, but does not qualify the name.
- FQUALIFY qualifies the name in _dir. Now, DIRNAME will return the absolute path of the name in _dir1, less the file portion of the name.
- BASENAME returns just the base (file) portion of the name in _dir. When appended to the result of DIRNAME(
) the result is a fully qualified, POSIX name.
- LISTFILE will search for just POSIX (HFS) named directories (seleq=[object=hfsdir]), and the TREE option tells LISTFILE to search recursively, following all sub-directories.