List Info

Thread: Removing extensions on external content dir with a pipe




Removing extensions on external content dir with a pipe
user name
2006-05-31 11:45:10
Hi all,

I needed to svn move the data of a couple of pubs that we
have at
wyona. 

I used a small pipe (*one* line in the shell!) to do it, may
it be
helpful for yourself. 

# removing .xml.meta replace with .meta
find . -name *.xml.meta|grep -v sitetree|grep -v .svn|awk
'{print
"TMP="$1";TMP2=`echo $TMP|sed
s/.xml.meta/.meta/g`; svn mv $TMP
$TMP2"}'|sh

# removing .xml replace with nothing
find . -name *.xml|grep -v sitetree|grep -v .svn|awk
'{print
"TMP="$1";TMP2=`echo $TMP|sed s/.xml//g`;
svn mv $TMP $TMP2"}'|sh

salu2
-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache
Lenya
http://www.wyona.com     
             http://lenya.apache.org
thorsten.scherlerwyona.com                thorstenapache.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )