XSL Extract File Suffix, Convert to Uppercase, Display
Monday, March 2nd, 2009<xsl:value-of
select="translate(substring-after(/Properties/Data/Datum[@Name='filename'],'.'),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:value-of
select="translate(substring-after(/Properties/Data/Datum[@Name='filename'],'.'),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>The below one liner will open all files in its path and change the word ‘MOO’ in any of the files to the word ‘BOO’.
find . -type f | xargs /usr/iw-home/iw-perl/bin/iwperl -i -p -e 's/MOO/BOO/g;'
This script has only been lightly tested so please make a backup of your files before running this!
This wonderful little tool written by Richard Aldridge uses ’sed’ to group together all the files under a particular folder of a certain type (in the example this is files whose name contains the string ‘local’ but you could easily change this to look for other groups of files such as ‘.log’ or ‘.html’ files) and then adds all their sizes up to give a total number of kb the files amount too.
find . -name '*local*' -ls | awk 'BEGIN {$count=0} /./ {$count += $7} END {print $count}'
This page is dedicated to all the quick one line utilities that are useful when managing an
Interwoven system or any other system that uses many files.
find . -name '*.xml' -exec /iw-home/iw-perl/bin/iwperl -e '$file=shift;system("/iw-home/bin/iwextattr", -g=> "TeamSite/Metadata/content_type", $file);warn "$file\n" if $?' {} ';' >/dev/null
find . -name \*.xml -exec iwregen {} ';'
This is useful to see if firewall is open when debugging OpenDeploy
(Thanks to Steve Martina for this one back in 2001):
/iw-home/iw-perl/bin/iwperl -MIO::Socket -e "$s=new IO::Socket::INET (PeerAddr=>'localhost',PeerPort=>80,Proto=>'tcp'); print $s?'OK':'fail'"
/iw-home/bin/iwlistmod . | grep x+