[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loops and scripting in eshell

From: Oliver Scholz
Subject: Re: Loops and scripting in eshell
Date: Tue, 21 Oct 2003 10:55:48 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Reiner Steib <> writes:

> On Sun, Oct 19 2003, Oliver Scholz wrote:
>> for i in `ls` do ...
> Useless use of ls. ;-)  for i in *; do something; done

Thanks! As I said, I am a shell dummy. :-)

Ah! And it works with eshell. I am saved.

>> 2. Where can I get (comprehensive) documentation for the sh (bourne?)
>>    command syntax?
> man sh ash bash ksh sh-posix  ;-)
> (Or maybe I don't understand the question?)

I was rather looking for something more formal, preferably with a CF
grammar. The "Shell Command Language Index" looks like what I had in
my mind, though. But never mind. Now that I know how to deal with the
simple loops that I need, I am not so keen anymore on implementing sh

Thanks again.

This possibility to mix Lisp and shell scripting is way cool. I could
get used to it:

[~] $ mkdir test; cd test
[test] $ touch alpha.test beta.test gamma.test
[test] $ for f in **/*(.) { if (string-match "\\(.*\\)\\.test$" f) { mv $f 
(match-string 1 f) }}
[test] $ ls
alpha  beta  gamma

30 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]