Bash script run rudy script

Hello

I trying to run a Rudy script from a bash script but it now working.
Can some one help please. The command runs normally eg if I type

/backups/s3sync/s3sync.rb -r -s --progress /backups/cpbackup/weekly
redwood_server:cpanel/11/03/19/

but went it in the script I get

/usr/bin/ruby: No such file or directory – /backups/s3sync/s3sync.rb -r
-s --progress /backups/cpbackup/weekly redwood_server:cpanel/11/03/19/
(LoadError)

Here the code I use for the script.

#!/bin/bash

CYEAR=`date +%y`
CMONTH=`date +%m`
CDAY=`date +%e`

/usr/bin/ruby "/backups/s3sync/s3sync.rb -r -s --progress
/backups/cpbackup/weekly redwood_server:cpanel/$CYEAR/$CMONTH/$CDAY/"

On Sat, Mar 19, 2011 at 3:13 AM, Rob S. [email protected] wrote:

/usr/bin/ruby: No such file or directory – /backups/s3sync/s3sync.rb -r
-s --progress /backups/cpbackup/weekly redwood_server:cpanel/11/03/19/
(LoadError)

/usr/bin/ruby “/backups/s3sync/s3sync.rb -r -s --progress
/backups/cpbackup/weekly redwood_server:cpanel/$CYEAR/$CMONTH/$CDAY/”

I don’t think you want to quote that entire string :slight_smile:


Hassan S. ------------------------ [email protected]
twitter: @hassan

/usr/bin/ruby “/backups/s3sync/s3sync.rb -r -s --progress
/backups/cpbackup/weekly redwood_server:cpanel/$CYEAR/$CMONTH/$CDAY/”

I don’t think you want to quote that entire string :slight_smile:

i concur.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs