projects
/
infodrom.org
/
lists.infodrom.org
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3c9452b
)
Added the script to fix the file suffix
author
Joey Schulze
<joey@infodrom.org>
Tue, 12 Aug 2003 13:04:49 +0000
(13:04 +0000)
committer
Joey Schulze
<joey@infodrom.org>
Tue, 12 Aug 2003 13:04:49 +0000
(13:04 +0000)
bin/fixsuffix
[new file with mode: 0755]
patch
|
blob
diff --git a/bin/fixsuffix
b/bin/fixsuffix
new file mode 100755
(executable)
index 0000000..
e639d8b
--- /dev/null
+++ b/
bin/fixsuffix
@@ -0,0
+1,24
@@
+#! /bin/bash
+
+# Fixes file suffix
+#
+# .html -> .shtml
+# Require "<!--#include"
+#
+# .html -> .php3
+# Require "<?"
+
+for f in $*
+do
+ if grep -q '<!--[ ]*#include' $f
+ then
+ base=${f%.html}
+ mv -f $f $base.shtml
+ else
+ if grep -q '<?' $f
+ then
+ base=${f%.html}
+ mv -f $f $base.php3
+ fi
+ fi
+done