[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: operating on dired marked files
From: |
François Gannaz |
Subject: |
Re: operating on dired marked files |
Date: |
Fri, 27 Jan 2006 01:09:39 +0100 |
User-agent: |
Mutt/1.5.11 |
Le jeu 26 jan 15:36, largo-linux a écrit :
> I would like to mark a number of files in dired and then use those
> files as arguments to a command.
>
> but when i try this in dired, i.e. i mark three files then hit ! and
> then perhaps a perl script. it seems only to output the results of the
> third file. is there a way to do this so that it executes
>
> script.pl file1.txt file2.txt file3.txt
>
You should read the documentation, it is faster than asking here.
Typing C-h k ! gives :
** <quote> **
! runs the command dired-do-shell-command
which is an interactive compiled Lisp function in `dired-aux'.
(dired-do-shell-command COMMAND &optional ARG FILE-LIST)
Run a shell command COMMAND on the marked files.
If no files are marked or a specific numeric prefix arg is given,
the next ARG files are used. Just C-u means the current file.
The prompt mentions the file(s) or the marker, as appropriate.
If there is output, it goes to a separate buffer.
Normally the command is run on each file individually.
However, if there is a `*' in the command then it is run
just once with the entire file list substituted there.
[...]
** </quote> **
The last paragraph is exactly what you want.
--
François Gannaz