You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Thorsten Scherler <th...@wyona.com> on 2006/05/31 13:45:10 UTC

Removing extensions on external content dir with a pipe

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.scherler@wyona.com                thorsten@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org