Aggiunge link ed2k al mulo da remoto

Questo script, prende in ingresso un file di link ed2k e, tramite amulecmd, aggiunge i link al mulo. poi il file viene cancellato.

comodo per aggiungere file al mulo tramite ssh ;)

#!/bin/bash

a=$(ls /media/sda3/ed2k_da_hp)

if [ "$a" != "" ]
then
$(nl /media/sda3/ed2k_da_hp/* > prova2)
i=1
numfile=$(wc -l prova2 | cut -d " " -f1)
while [ "$i" -le "$numfile" ]
do
file=$(echo e$(tail -n1 prova2 | cut -d "e" -f2-9999))
cat prova2 | sed '$d' > prova2
echo $numfile
let "i=i+1"
amulecmd -c "add $file"
done
rm -r /media/sda3/ed2k_da_hp/*
fi

Lascia un Commento

Fill in your details below or click an icon to log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Log Out / Modifica )

Foto Twitter

You are commenting using your Twitter account. Log Out / Modifica )

Foto di Facebook

You are commenting using your Facebook account. Log Out / Modifica )

Connecting to %s

 
Iscriviti

Get every new post delivered to your Inbox.