ez projects / ez_shell_tools
|UNIX name||Owner||Status||Version||Compatible with|
|ez_shell_tools||Steven E Bailey||planning||1.0||Any|
bashrc_add: This is what I add to my bashrc so it's easier to navigate
multiple eZPublish sites on one machine. It allows changing of
cd'ing to the eZPublish root and allows for using $EZ on the command line
Use this to find files that have been infected with the Byte Order Mark
windows text editors.
for a longer explanation.
This shell script will split a mysql database dumping each
table into a separate file. used in conjunction with dbsplit
- which will split each database entry to a separate line,
it is possible to see exactly what has changed in the database
diff --recursive --suppress-common-lines --side-by-side
The only argument is a filename which should be a dbdump file with
.sql extension. The files will be written to a directory named the
same as the file with the .sql stripped off. If the file does not
a .sql extension, then the file will be appended with the process
of this shell script.
This will split each database entry into a seperate line. If you've
tried finding something in an ezpublish mysql dump you'll have noticed
you get some million character lines that make it nearly impossible to
This outputs a settings files sorted alphabetically by the [head] line.
doing this on two different files, they can be diffed to see any
Which is especially useful for comparing settings of different site
such as override.ini.append.php settings.
WARNING: Not a good idea to REPLACE the settings file with the output
because sometimes order matters - on the match nodes for example.
This is a shell wrapper for grep that makes it easier to do recursive
on directories. Use -d to define the directory root(s) or it will
$PWD if none is given. Long options for grep fall through.
I end up using this all of the time - e.g.:
search.sh -H -d $EZ/lib $EZ/kernel fetchListByClassID|grep function
Finds the functions called fetchListByClassID in the eZPublish
directories lib and kernel.
search.sh -d $EZ/lib $EZ/kernel "[[:blank:]]function [A-z]"
lists all functions in all files in lib kernel
search.sh -f -d $EZ/design line.tpl
Finds files named line.tpl underneath the design directory.
search.sh --after=10 -d $EZ/settings DatabaseSettings
quickly find the database settings.
Sometimes debugging html problems can be difficult, especially on files that
are 1000s of lines long and where tags are all over the place. This
shell will fix the indentation - of an html of template file - to
make it easier to read. Most of the time I run this to find a missing
div tag (which is the default).
This does a check for common tags in template files to find mismatched
code blocks. Could return false positives if a tag is closed in a
template. Can be run on one file or recursively on a directory.
Generally speaking I run this at the end of developing a site to find
errors that are not always obvious from the html output but can cause
problems (such as cache-blocks that aren't closed).