*BSD News Article 46745


Return to BSD News archive

Xref: sserve comp.unix.misc:17656 comp.unix.admin:30403 comp.unix.bsd:16680 comp.unix.programmer:26996 comp.unix.questions:66591 comp.unix.shell:23584
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!gatech!newsjunkie.ans.net!butch!cliffy.lfwc.lockheed.com!harrier!tad
From: tad@harrier (Tad McClellan)
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
Followup-To: comp.unix.misc,comp.unix.admin,comp.unix.bsd,comp.unix.programmer,comp.unix.questions,comp.unix.shell
Date: 12 Jul 1995 12:26:45 GMT
Organization: Lockheed Martin Tactical Aircraft Systems
Lines: 23
Message-ID: <3u0f25$5lm@cliffy.lfwc.lockheed.com>
References: <3tk3dc$4ml@rcp6.elan.af.mil> <3tvvv1$lsk@israel-info.datasrv.co.il>
NNTP-Posting-Host: harrier-ietm.lfwc.lockheed.com
X-Newsreader: TIN [version 1.2 PL1]

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.

--

---------------------------------------------------------------------
| Tad McClellan,      Logistics Specialist (IETMs and SGML guy)
|                     Lockheed Martin Tactical Aircraft Systems
|                     voice: (817) 763-6314
|                     email: mcclellantj@lfwc.lockheed.com
---------------------------------------------------------------------
|
| All I want, is a little more than I'll ever get.
|
---------------------------------------------------------------------