From: Friedrich Dominicus <frido@q-software-solutions.com>
Subject: Re: A very simple question on SED or AWK for a GURU, possibly a lisp script or emacs batch processing of many files
Date: 14 Jan 2003 11:23:58 +0100 [thread overview]
Message-ID: <874r8cjagx.fsf@fbigm.here> (raw)
In-Reply-To: b00bb831.0301140042.4dff4b4e@posting.google.com
gnuist006@hotmail.com (gnuist006) writes:
>
> Mr Friedrich's reply uses perl.
Definitly not. It's Common Lisp.
>
> On the other hand for a lisp based solution
> I CAN write a macro or a lisp function to do the
> core logic in lisp inside emacs by myself using narrow
> and widen or transient mode. But here what I do not know
> is how to load one file after another and then save it
> to a new name and close that buffer. Please just show me
> how to do a bunch of files in this way. I can generate the
> file names like this in bash:
Well extending my solution to more files is easy
(mapc '#(lambda (file) (q-2003-01-14 file)
;; rename the generated file if needed)
(directory "pattern"))
That's all
Doing that all in Emacs Lisp isn't much more difficult.
>
> for i in `du -a directory | grep file.txt | sed to remove some junk
> from du`; do
For getting a file listing in Common Lisp use directory in Emacs Lisp
it's directory-files.
But I *strongly* sugggest you post there where you expect an
answer. Is it a shell problem use some .shell group if it's Emacs Lisp
use some emacs Newgroup and if you want Common Lisp post here.
Friedrich
next prev parent reply other threads:[~2003-01-14 10:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-14 0:03 A very simple question on SED or AWK for a GURU, possibly a lisp script or emacs batch processing of many files gnuist006
2003-01-14 3:46 ` Christopher J. White
2003-01-14 7:13 ` Friedrich Dominicus
2003-01-14 8:42 ` gnuist006
2003-01-14 10:23 ` Friedrich Dominicus [this message]
2003-01-14 22:10 ` Wayne Throop
2003-01-14 18:18 ` ericjb
2003-01-14 19:34 ` Stefan Monnier <foo@acm.com>
2003-01-14 22:54 ` Alan Mackenzie
2003-01-14 23:19 ` Kaz Kylheku
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874r8cjagx.fsf@fbigm.here \
--to=frido@q-software-solutions.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.