<rdf:RDF
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xml:base='http://www.stefanrufer.ch/snipsnap/rdf'>
    <s:Snip rdf:about='http://www.stefanrufer.ch/snipsnap/rdf#Virtual+Brain/Linux/Mover+Filerename+Script'
         s:cUser='stefan'
         s:oUser='stefan'
         s:mUser='stefan'>
        <s:name>Virtual Brain/Linux/Mover Filerename Script</s:name>
        <s:content>{code:none}&#xD;&#xA;#!/bin/bash&#xD;&#xA;#&#xD;&#xA;# Script copies unordered files from src dir to ordered&#xD;&#xA;# files in destdir. File names generated by simple counter.&#xD;&#xA;# Src File names extracted from html file that contains&#xD;&#xA;# the correctly ordered list.&#xD;&#xA;#&#xD;&#xA;# 2004-12-06, stefanrufer.ch&#xD;&#xA;&#xD;&#xA;# extract src filenames from html file. html contains filenames in correct order&#xD;&#xA;LIST=`cut --delimiter=\&quot; --fields=11 index.html | grep jpg`&#xD;&#xA;# echo $LIST&#xD;&#xA;&#xD;&#xA;DEST_DIR=dest&#xD;&#xA;SRC_DIR=images&#xD;&#xA;&#xD;&#xA;# clear destination directory&#xD;&#xA;rm $DEST_DIR/*&#xD;&#xA;&#xD;&#xA;# start counter high enough so we don&apos;t need leading zeroes&#xD;&#xA;CNT=1000&#xD;&#xA;&#xD;&#xA;# copy loop&#xD;&#xA;for SRC_FILE in $LIST&#xD;&#xA;do&#xD;&#xA;  echo copying $SRC_DIR/$SRC_FILE to $DEST_DIR/$CNT.jpg&#xD;&#xA;  cp $SRC_DIR/$SRC_FILE $DEST_DIR/$CNT.jpg&#xD;&#xA;  # counting in bash - didn&apos;t know this before&#xD;&#xA;  let CNT=$CNT+10&#xD;&#xA;done&#xD;&#xA;{code}</s:content>
        <s:mTime>2004-12-06 21:03:16.929</s:mTime>
        <s:cTime>2004-12-06 21:03:16.929</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://www.stefanrufer.ch/snipsnap/rdf#Virtual+Brain/Linux'/>
                <rdf:li rdf:resource='http://www.stefanrufer.ch/snipsnap/rdf#Virtual Brain'/>
                <rdf:li rdf:resource='http://www.stefanrufer.ch/snipsnap/rdf#Virtual Brain/Linux'/>
                <rdf:li>
                    <s:Snip rdf:about='http://www.stefanrufer.ch/snipsnap/rdf#Virtual+Brain/Linux/Mover+Filerename+Script'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>

