|
From: | Friedrich Dominicus |
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 |
User-agent: | Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Military Intelligence) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |