• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Copy folder shell scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy folder shell scripting


  • Subject: Re: Copy folder shell scripting
  • From: Philip Aker <email@hidden>
  • Date: Thu, 24 Apr 2008 07:35:00 -0700

On 08-04-24, at 07:24, ba95 wrote:

Thanks a lot, Philipp and Marc.

I did not know this marvellous "rsync" . Shame on me ! ;-)

2 collateral questions:

1- What do I put at the beginning/end of the shell script ?

-----------
#!/bin/sh
(cd /Volumes/A; rsync -aR Path/To/Folder/1 Path/To/Folder/2 /Volumes/ B)
-----------
Is that correct ?


2- What extension do I put to the shell script fille, so that it will be recognized ?
None ?


Sorry, I am a poor shell newbie...

Have pity. ;-)

You must mark the script to be executable with a call from Terminal after the file is created. An extension is not necessary but typically you would use .sh for a /bin/sh call and .pl for a /usr/bin/perl call, etc.


chmod u+x myrsync.sh

Another thing about shell scripting is that it's very particular about spellings. For instance calling Philip Philipp and Mark Marc is not acceptable in shell scripts.

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Sent from my SE/30

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Copy folder shell scripting (From: ba95 <email@hidden>)
 >Re: Copy folder shell scripting (From: "Mark J. Reed" <email@hidden>)
 >Re: Copy folder shell scripting (From: "Mark J. Reed" <email@hidden>)
 >Re: Copy folder shell scripting (From: ba95 <email@hidden>)

  • Prev by Date: Re: Copy folder shell scripting
  • Next by Date: Re: Copy folder shell scripting
  • Previous by thread: Re: Copy folder shell scripting
  • Next by thread: Re: Copy folder shell scripting
  • Index(es):
    • Date
    • Thread