Share/Save/Bookmark
Subscribe

Hot offers:

Your Ad Here
Jobs By Category:
.NET
Accounting/Bookkeeping
Ajax
Android
ASP
Audio Services
Banner Design
C/C++
CMS
Cold Fusion
Copywriting
CSS
Data Entry
Data Processing
Delphi
Drupal
E-Commerce
Electronics
Engineering
Excel
Flash
Graphic Design
Handheld
Handheld / PDA
iPhone
J2EE
Java
Javascript
Joomla
JSP
LDAP
Legal Advice
Link Building
LinkBuilding
Links
Linux
Logo Design
Magento
Market Research
Marketing
MS Access
MS SQL
MS Windows
mSQL
MSWindows
Multimedia
MySQL
Oracle
OsCommerce
Perl/CGI
Photography
Photoshop
PHP
PostgreSQL
Programming
Project Management
Proofreading
Python
Ruby/Ruby on Rails
Script Installation
Search Engine Optimization
Security
SEO
Social Networking
SQL
Support
System Admin.
System Administration
Telemarketing
Training
Translation
Video Services
Virtual Reality
Visual Basic
Web Promotion
Website Design
Website Security
Windows
Wireless
Wordpress
Writing
XHTML
XML


Your Ad Here

BASH PROGRAMING! (Linux)

Your Ad Here


I have a script that I wrote and I need it extended,

I need the script to compare a directory list to a user variable if the directory does not exist then it needs to be created.

Then the users remote directory gets mounted (there are multiple users)

then an rsync takes place.

Please notice how I create the directories daily by date!

Your job is to fix up this script, I got the script to compare usernames by the number of letters and thats wrong.

so i need a spot to enter the mount points as well and to get the script to compare and care directories.

my budget is $ 30

#!/bin/bash
users=( ysapir david rpril zrobinson )
emailadd=
hostname=`hostname`
directory=`date +%Y-%m-%d`

echo $ {users[@]}
echo $ directory


foonum=$ {#users}

count=0

for d in $ ( ls /backup/ ); do

echo $ {d[@]}

for ((i=0;i<$ foonum;i++)); do

if [ "$ {users[$ {i}]}" = "$ {d[@]}" ] ; then
echo $ {users[$ {i}]} directory is synced

mount //192.168.1.11/MyDocuments/Backup /mnt/$ {users[0]}/ -o username=ysapir,password=zublahzublah
rsync -av /mnt/ysapir/ /backup/$ {users[0]}/$ directory | tee /tmp/rsync.log

cat /tmp/rsync.log | mail -s "$ (date)"

cat /tmp/rsync.log >> /var/log/rsync/log

umount //192.168.1.11/MyDocuments/Backup

let "count += 1"
fi

done
done

echo "COUNT: " . $ {count}
echo "FOONUM: " . $ {foonum}

if [ $ {count} != $ {foonum} ] ; then

echo Usernames are not synced, please verify variable.
else
echo Usernames are all synced.
fi

Your Ad Here



Get custom programming done at GetAFreelancer.com!

Latest Related projects:

Title Bids Avg
Css Programing 2 18 $ 29
Experienced Graphic Designer with Opensource Programing Know   2 $ 275
Easy Application Programing - Cracking Knowledge Required   0 n/a
Mac OS Application Programing - Cracking Knowledge Required   0 n/a
Programing - Cracking knowledge Reqired   2 $ 150
Php Programing 0 n/a
Finishing Php Programing 3 n/a
Finishing Php Programing 3 n/a
Finishing Php Programing 3 n/a
Finishing Php Programing 3 n/a
Finishing Php Programing 3 n/a
Brazil dreambox 500s programing   0 n/a
Bash Shell/wmi Vbscript Script 0 n/a
Search/replace Perl or Bash script   3 $ 30
programing job needed   2 $ 53
SIMPLE IPHONE GAME APPLICATION PROGRAMING NEEDED   0 n/a
Bash Script/Applescript Update/Review/Add error-checking   0 n/a
Shell script automation bash 0 n/a
Web design and programing 2 $ 250
New Website + Programing 0 n/a
search & replace on server in bash 0 n/a
Sugar Crm Programing 1 0 n/a
php based web site programing 0 n/a
Ssh Bash Script To Edit Files 0 n/a
Need Good Programing Dating 0 n/a
ffmpeg bash script 5 $ 137
Programing 1 n/a
Programing And Seo Only 0 n/a
2000 word Academic Paper/Article on "Use of NLP (Neuro Linguistic Programing) In Criminal Investigations 1 $ 100
Bash Shell Script 0 n/a



Outsource your programming projects at ScriptLance.com today - Free signup

Post and Bid on projects! Join EUFreelance.com for free!




Currently viewed: "BASH PROGRAMING!"
All for Freelancers version: "BASH PROGRAMING!"