Linux shell script

This project received 47 bids from talented freelancers with an average bid price of $ USD.

Get free quotes for a project like this
Employer working
Project Budget
$30 - $100 USD
Total Bids
Project Description


We are looking for an experienced linux (debian) admin that can write logic below as a proper executable shell script.

The script should loop and copy files of a directory to newly created ones.
Then set file permissions, edit a line in a config file and add a crontab.

//shell script logic outline

start = '11001'

end = '10005'

inc ='1'

cronmin1 = 5

cronmin2 = 20

cronmin3 = 35

cronmin4 = 50

base_dir = '11000'

base_path = '/var/www/dcs'

//start loop from above defined start to end

for (i = $start; i <= $end; i = i + $inc){

//copy all files from base new directory

cp -r $base\_path/$base\_dir $base_path/$i

//change file permissions

chmod 666 '$base_path/$i/*.log

chmod 666 $base_path/$i/*.txt

//edit line in [url removed, login to view] to reflect correct port

sed 's/port = $base/port = $i/' $base_path/$i/[url removed, login to view]

//add crontab like this entry

$cronmin1,$cronmin2,$cronmin3,$cronmin4 \* * *| * $base_path/$i/[url removed, login to view] >/dev/null #Portcheck $i


Many thanks,


Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online