[Digikam-users] Not completely but a bit off topic question: looking for texteditor with macro capabillity
somlist at xs4all.nl
Tue Aug 30 09:45:39 BST 2011
On 27/08/11 11:54, sleepless wrote:
> Hi all,
> There is so much knowledge around here that I give it a try, i hope
> the moderater will let me.
I don't think there's a moderator on this list ;-)
> I have been using for about 25 years PE.exe. This is a programmers
> texteditor from word perfect.
> for example you could do in dos ¨dir > dir.lst
> open the document pe dir.lst
> it shows for example
> a list of
> then very easy make a macro to put in front ¨move ¨ ¨
> then search for ¨\¨ then block and search twice again for ¨\¨
> than copy the ¨\foto\digikam\¨ part
> put at the end of the row ¨¨ O:\and paste
> and add copiedphoto.jpg
> now you have something like
> move ¨d:\foto\digikam\photo.jpg¨ ¨O:\foto\digikam\photo.jpg¨
> and you can apply it to all rows.
> make it a batch file and execute.
> And as you all know by now, I am after saying goodby to windows, this
> is the next problem to tackle.
> Yes, it is a horrible example, but how do linux people do things like
I used to teach this stuff for a while at AT Computing (Nijmegen)
I saw some very well intended suggestions already, hopefully that has
pointed in the right direction, perhaps I can add a few more...
First of all, the shell (bash probably) is a very complete and powerful
tool, especially in combination with other unix commands. Unfortunately
it is also quite complex to get started and easy to get sent into the
woods and get lost.
a command like:
for f in *; do mv "$f" /someplace/else; done
is already quite an advanced command and easy to get wrong (with
filenames containing spaces and such)
moving lots of files can easily be done using the mv command:
moving all files to an existing directory:
mv * /someplace/else
moving all .jpg files
mv *.jpg /someplace/else
it's important to know that the shell (bash) is modifying the command
before executing it. This makes it possible to move files with spaces in
them, because bash knows that the expanded names with spaces belong
together. (This is due to the order in which the command is interpreted).
All this is contained in the bash manual (man bash), but that is a long
read and you need several iterations of understanding, experimenting and
the find command can also be useful, but that is at least as complex as
bash to learn how to use correctly...
More information about the Digikam-users