home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
historic
/
v941.tgz
/
icon.v941src.tar
/
icon.v941src
/
ipl
/
progs
/
cwd.icn
< prev
next >
Wrap
Text File
|
2000-07-29
|
967b
|
42 lines
############################################################################
#
# File: cwd.icn
#
# Subject: Program to write current working directory
#
# Author: Ralph E. Griswold
#
# Date: June 10, 1994
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program write the current working directory, shorn of it's
# path specification.
#
# For appropriately named directories, it can be used as, for example,
#
# ftp `cwd`
#
############################################################################
#
# Requires: UNIX
#
############################################################################
procedure main()
local i
read(open("pwd", "p")) ? {
i := 0 # for safety
every i := upto('/') # expect full path
tab(i + 1)
write(tab(0))
}
end