*BSD News Article 46797


Return to BSD News archive

#! rnews 1346 sserve.cc.adfa.oz.au
Xref: sserve comp.unix.misc:17684 comp.unix.admin:30453 comp.unix.bsd:16684 comp.unix.programmer:27025 comp.unix.questions:66661 comp.unix.shell:23628
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!noc.netcom.net!news.sprintlink.net!dish.news.pipex.net!pipex!news.mathworks.com!udel!princeton!cnn.Princeton.EDU!wagner!tim
From: tim@wagner.Princeton.EDU (Tim Hollebeek)
Newsgroups: comp.unix.misc,comp.unix.admin,comp.unix.bsd,comp.unix.programmer,comp.unix.questions,comp.unix.shell
Subject: Re: A Unix command to obtain directory name only
Date: 14 Jul 1995 21:15:15 GMT
Organization: Princeton University
Lines: 20
Message-ID: <3u6mp3$sb7@cnn.Princeton.EDU>
References: <3tk3dc$4ml@rcp6.elan.af.mil> <3tvvv1$lsk@israel-info.datasrv.co.il> <3u0f25$5lm@cliffy.lfwc.lockheed.com>
NNTP-Posting-Host: wagner.princeton.edu

In article <3u0f25$5lm@cliffy.lfwc.lockheed.com>,
Tad McClellan <tad@harrier> wrote:
>Tsachi Merin (tsachi@hpcms.co.il) wrote:
>
>: ls -F1 /dir | grep '/'
>
>: -1 ensures each one on a separate line (for the grep)
>
>
>I don't think the '-1' is necesary. ls can tell that its output is going
>into a pipe, so it doesn't put output into columns.

On some systems.  IRIX, for example, doesn't behave sanely like that.




-- 
---
Tim Hollebeek                   'There will be a better sig when I have time'