| www.delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| MIME-Version: | 1.0 |
| Subject: | Read not honouring "-r"? |
| Date: | Tue, 19 Sep 2006 12:34:35 +0930 |
| Message-ID: | <D3DA8E9DB543364DB6DE9B5964BA8EEA4F292E@auntm231.apac.corp.eds.com> |
| From: | "Irwin, Doug" <doug DOT irwin AT eds DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| 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 |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id k8J35D5K013556 |
All,
I am working on a script which monitors mounts for free space.
It does this by reading from a config file (surprise) consisting of
mount, threshold, threshold.
One would expect a "read -r fs t2 t3" to process this without attempting
to expand slashes. But I can't seem to get this bit working... And I
can't seem to find any doco on doing that in Cygwin.
The files I am using are tagged on the and in the hope that someone can
help me work this out. Sorry, but the mailservers blocks them otherwise
:(
No doubt I have missed something rather obvious.
Any assistance greatly appreciated!
Regards,
-doug
--------------------------------------------------
test.sh
--------------------------------------------------
#!/bin/ksh
FSCFG=./filesystems.cfg
grep -v '^#' $FSCFG > /tmp/fscfg$$
while read -r fs t2 t3
do
echo "$fs"
echo "$t2"
echo "$t3"
done < /tmp/fscfg$$
--------------------------------------------------
filesystems.cfg
--------------------------------------------------
/ 200 200
/c 200 200
/d 200 200
/usr/bin 200 200
/usr/lib 200 200
--------------------------------------------------
--
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 |