All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Gelm <nc8q@gelm.net>
To: linux-newbie@vger.kernel.org
Subject: Re: bash script problem
Date: Tue, 10 Dec 2002 16:19:07 -0500	[thread overview]
Message-ID: <3DF65A4B.E53E6BE4@gelm.net> (raw)
In-Reply-To: 3DF61C86.51C4AD34@ihug.co.nz

Check this bash script for me, please.

#/bin/sh
#
# if a floppy can be formatted 1.68 megabytes
#    with 0 bad blocks
# else
#    format 1.44 megabytes
# fi
# mkfs.msdos /dev/fd0
#
if   (superformat /dev/fd0u1680 && badblocks -c 512 -n /dev/fd0u1680);
then
     mkfs.msdos /dev/fd0u1680
else superformat /dev/fd0u1440 
     mkfs.msdos /dev/fd0u1440
fi
mdir
#

 I'm thinking that 'badblocks' can find bad blocks and still return
a 'true' condition.  If this is true, is there any way to cause
the smaller format?

 If 'superformat /dev/fd0u1680' fails, it drops back to '/dev/fd0u1440'.

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2002-12-10 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-10  2:08 bash script problem Daniel Peter Cavanagh
2002-12-10 16:55 ` ichi
2002-12-10 21:19   ` Chuck Gelm [this message]
2002-12-10 17:07 ` Brian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DF65A4B.E53E6BE4@gelm.net \
    --to=nc8q@gelm.net \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.