Register
It is currently Fri Nov 21, 2014 4:30 am

need a script for batch uploading of usenet binary posts


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Mon Oct 06, 2008 1:05 am   

Joined: Mon Oct 06, 2008 12:47 am
Posts: 2
i am trying to use newspost to batch upload binaries from a certain directory to usenet. the following line needs to be executed inside of every directory inside of /home/user/Music piping the title of directory into subject. it must be called within the directory because if executed from /home/user/Music it simply wont find any files there. i need the command to be executed inside every specific directory within /home/user/Music/ also there is a field for subject which is in quotes like "SUBJECT" and preferably, i'd like to pipe the directory name to that field within quotes so as to use a different subject per directory. here is the syntax of the command i'd like to use:

newspost -i news.giganews.com -u username -p password -f myemail@emailaddress.com -n alt.binaries.mp3 -y -s "SUBJECT" "/home/user/Music/*"

if anyone could help out i'd appreciate that. there seems to be little information on the net on doing this save for issuing the command one at a time, which is awful.

i'm basically trying to upload my entire music collection.


Top
 Profile  
 PostPosted: Mon Oct 06, 2008 2:32 pm   
User avatar

Joined: Sun Apr 13, 2008 4:05 am
Posts: 37
Location: /dev/random
i didnt try it, but it may help you.
Quote:
#!/bin/bash
for ind in `ls /home/user/Music/ | sed s/\ /#/g`
do
file=`echo $ind|sed s/#/\ /g`
name=`basename $file`
subject="Listen this: $name"
newspost -i news.giganews.com -u username -p password -f myemail@emailaddress.com -n alt.binaries.mp3 -y -s $subject $file
echo "$file sent!"
done


Top
 Profile  
 PostPosted: Mon Oct 06, 2008 6:46 pm   

Joined: Mon Oct 06, 2008 12:47 am
Posts: 2
that was so awesome of you to help.

i have not tested. will do so sometime soon.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP