From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10818 invoked by alias); 22 Jun 2015 17:59:31 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20264 Received: (qmail 6272 invoked from network); 22 Jun 2015 17:59:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Message-ID: <55884CFC.6010803@necoro.eu> Date: Mon, 22 Jun 2015 19:59:24 +0200 From: lists@necoro.eu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Meino.Cramer@gmx.de CC: zsh-users@zsh.org Subject: Re: ls -l *(/)... References: <20150622031753.GA4342@solfire> <55879C40.9020102@necoro.eu> <20150622163654.GB4560@solfire> In-Reply-To: <20150622163654.GB4560@solfire> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit > ...unfortunately the command does not output eactly what I want... > > ls */* > > gives > > directory: > file1 > file2 > file3 > > and I want > > directory/file1 > directory/file2 > directory/file3 > > ...sorry I didn't mentioned that... > > Any way to acchieve this? Well, here, the output is exactly like how you want it (do you have `ls` being some alias?). BUT: As you require your `ls`-Output to be exactly adhering to some format, I'd argue that `ls` is not what you want in the first place. Best guess is, all you need is the '*/*' itself which just represents the list of files as you want them: echo */* Of course you can also iterate over them: for f in */*; echo $(basename $f) Also: Instead of using `ls` to get lists of files when globbing itself does not work (or gets too complicated), I'd recommend using `find`. Besides having lots of ways to express queries for files, it also allows very easily to pass the results on farther down the pipe. Best regards, René