Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxi.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!ihuxi!snafu From: snafu@ihuxi.UUCP (Dave Wallis) Newsgroups: net.unix Subject: Re: Little question on "cat" Message-ID: <948@ihuxi.UUCP> Date: Wed, 27-Jun-84 17:01:07 EDT Article-I.D.: ihuxi.948 Posted: Wed Jun 27 17:01:07 1984 Date-Received: Thu, 28-Jun-84 06:10:38 EDT References: <1211@sri-arpa.UUCP> <2807@tektronix.UUCP> Organization: AT&T Technologies, Inc., Naperville Il. Lines: 28 > Does anyone know why "cat" doesn't seem to have a flag... > to simply list files with an indication of the name of the file > preceeding the contents, separated from the data by a special > character or a newline or two... ? There are several lsolutions to this problem. If you have access to experimental tools (ATT only), the "more" command does what you want. If you don't have more, the folllowing shell script should work nicely: for i in $* do echo "***** $i *****\n" /bin/cat $i done Put this in a file called "cat" in your own bin directory (or any directory for that matter), and make sure that the directory will be searched before /bin (i.e. PATH=$HOME/bin:$PATH) and voila! you now have a cat command that identifies the files before printing them. -- Dave Wallis ihnp4!ihuxi!snafu AT&T Technologies, Inc. (312) 979-5894