blob: 73ad19878c12d6bbff8f9de9e1b6116cb66bcb79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
############################################################################
#
# File: ftype.icn
#
# Subject: Procedure to produce type for file
#
# Author: Ralph E. Griswold
#
# Date: March 10, 1998
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This procedure returns the file identification produced by file(1).
#
############################################################################
#
# Requires: UNIX
#
############################################################################
procedure ftype(file)
read(open("file " || file, "p")) ? {
tab(upto('\t'))
tab(many('\t'))
return tab(0)
}
end
|