All pastes #361053 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-17 22:12 UTC
rendered paste body
CURRENT MAKENOWNEXT.SH

#!/bin/bash
while true
do
artist=`tr "%^" "\n" </var/webpull/tdir/nowplaying/nn.temp|grep -a ZZ|sed s/ZZ//g| sed '/./,/^$/!d'`
album=`tr "%^" "\n" </var/webpull/tdir/nowplaying/nn.temp|grep -a XX|sed s/XX//g |sed '/./,/^$/!d'`
title=`tr "%^" "\n" </var/webpull/tdir/nowplaying/nn.temp|grep -a QQ|sed s/QQ//g |sed '/./,/^$/!d'`
asin=`tr "%^" "\n" </var/webpull/tdir/nowplaying/nn.temp|grep -a ZX|sed s/ZX//g |sed '/./,/^$/!d'`
if [ "$artist" ]
  then
cat /dev/null >/var/webpull/tdir/nowplaying/nn.temp
        artist4=$artist3
        artist3=$artist2
        artist2=$artisttemp
        artisttemp=$artist
        albumArt4=$albumArt4
        albumArt3=$albumArt3
        albumArt2=$albumArttemp
        albumArttemp=$albumArt
        album4=$album3
        album3=$album2
        album2=$albumtemp
        albumtemp=$album
        song4=$song3
        song3=$song2
        song2=$songtemp
        songtemp=$song
        asin4=$asin3
        asin3=$asin2
        asin2=$asintemp
        asintemp=$asin
    echo -e "<?xml version="1.0" standalone="yes"?>
   <nowplaying>
           <artist>$artist</artist>
           <albumArt></albumArt>
           <album>$album</album>
           <song>$title</song>
        <asin>$asin</asin>
        <artist2>$artist2</artist2>
           <albumArt2></albumArt2>
           <album2>$album</album2>
           <song2>$title2</song2>
        <artist3>$artist3</artist3>
           <albumArt3></albumArt3>
           <album3>$album</album3>
           <song3>$title3</song3>
        <asin3>$asin3</asin3>
        <artist4>$artist4</artist4>
           <albumArt4></albumArt4>
           <album4>$album4</album4>
           <song4>$title4</song4>
        <asin3>$asin3</asin3>
   </nowplaying>" >/var/webpull/tdir/nowplaying/nowplaying.xml


fi
 sleep 2
done
exit 0