delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <14113631.post@talk.nabble.com> |
Date: | Sun, 2 Dec 2007 01:15:53 -0800 (PST) |
From: | airzonk <gabegreen AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Shell script: Mount C$, xcopy files over, >> to result file |
MIME-Version: | 1.0 |
X-Nabble-From: | gabegreen AT gmail DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Hi All: This is what I'd like to do. I have a list of machines (by IP address) - about 100 in total. #!/bin/sh mount //10.0.1.15/C$ (Parameters for username and password? they are the same on each machine.) Now, I would like to mount them all to a share the same name as the machine. I.E in the example above, /10.0.1.15/ would be a nice mountpoint. Then, for each mountpoint, I need to copy some files over: cp ./DIR1/file1 ./C/Documents\ And\ Settings/All\ Users/Desktop/file2 /10.0.1.15/ If the target directory already exists (and it will), ignore it and simply place it in that directory. If the target *file* already exists, overwrite is OK. You'll have to forgive my rustyness on sh script. It's been awhile and I am in a huge hurry. Help with this would be greatly appreciated. Thanks - Gabe -- View this message in context: http://www.nabble.com/Shell-script%3A-Mount-C%24%2C-xcopy-files-over%2C-%3E%3E-to-result-file-tf4930952.html#a14113631 Sent from the Cygwin list mailing list archive at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |