mlsamuelson.com

Topic “command line”

FOR - looping

for each in my_module.*;
> do
> echo $each
> done

Note the > are added automatically when the ; begins multiple line command entry.

This'll output something like this (depending on your files, of course):
my_module.info
my_module.install
my_module.module

LOCATE - find files by name

locate Lite.php

Finds files matching the pattern, in this case Lite.php, in your file system.

RENAME - rename multiple files

rename oldname newname oldname.*

Renames files selected by the expression oldname.* replacing oldname with newname.

Given a directory of files with names:
oldname.info oldname.install oldname.module README.txt

Running the above command would result in:
newname.info newname.install newname.module README.txt

Do a man rename for more info.

Syndicate content

User login