Summary: newfs

From: Doug S Johnson <Doug_S_Johnson_at_raytheon.com>
Date: Mon Oct 01 2001 - 18:40:38 EDT
This is a multipart message in MIME format.
--=_alternative 007CAFBA86256AD8_=
Content-Type: text/plain; charset="us-ascii"

Thanks to all that replied to numerous to list.

I had several solutions that would work:

Use mkfs it's non-interactive

Use expect

newfs /dev/rdsk/c0t8d0s0 <  $inputfile  (Input file has a "y" in it)

newfs /dev/rdsk/cxtxdxs0 << EOF y EOF

newfs /dev/rdsk/cxtxdxs0 << END y END

newfs  /dev/rdsk/cxtxdxs0 < /dev/null

echo y | newfs /dev/rdsk/cxtxdxsx (Suggested by plenty and my personal 
favorite).


----- Forwarded by Doug S Johnson/RCS/Raytheon/US on 10/01/01 05:31 PM 
-----


"Doug S Johnson" <Doug_S_Johnson@raytheon.com>
Sent by: sunmanagers-admin@sunmanagers.org
09/28/01 01:05 PM

 
        To:     sunmanagers@sunmanagers.org
        cc: 
        Subject:        newfs



I need to write a script which performs a newfs on several 
filesystems..how do I answer "y" to the question below within the script?? 

        "construct a new file system /dev/rdsk/cxtxdxsx: (y/n) " 

Thanks In Advance. 

                                                        Doug

--=_alternative 007CAFBA86256AD8_=
Content-Type: text/html; charset="us-ascii"




<br><font size=2 face="sans-serif">Thanks to all that replied to numerous to list.</font>
<br>
<br><font size=2 face="sans-serif">I had several solutions that would work:</font>
<br>
<br><font size=2 face="sans-serif">Use mkfs it's non-interactive</font>
<br>
<br><font size=2 face="sans-serif">Use expect</font>
<br>
<br><font size=2 face="sans-serif">newfs /dev/rdsk/c0t8d0s0 &lt; &nbsp;$inputfile &nbsp;(Input file has a &quot;y&quot; in it)</font>
<br>
<br><font size=2 face="sans-serif">newfs /dev/rdsk/cxtxdxs0 &lt;&lt; EOF y EOF</font>
<br>
<br><font size=2 face="sans-serif">newfs /dev/rdsk/cxtxdxs0 &lt;&lt; END y END</font>
<br>
<br><font size=2 face="sans-serif">newfs &nbsp;/dev/rdsk/cxtxdxs0 &lt; /dev/null</font>
<br>
<br><font size=2 face="sans-serif">echo y | newfs /dev/rdsk/cxtxdxsx (Suggested by plenty and my personal favorite).</font>
<br>
<br>
<br><font size=1 color=#800080 face="sans-serif">----- Forwarded by Doug S Johnson/RCS/Raytheon/US on 10/01/01 05:31 PM -----</font>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>&quot;Doug S Johnson&quot; &lt;Doug_S_Johnson@raytheon.com&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: sunmanagers-admin@sunmanagers.org</font>
<p><font size=1 face="sans-serif">09/28/01 01:05 PM</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; &nbsp; &nbsp;sunmanagers@sunmanagers.org</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;newfs</font></table>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">I need to write a script which performs a newfs on several filesystems..how do I answer &quot;y&quot; to the question below within the script??</font><font size=3 face="sans-serif"> </font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &quot;construct a new file system /dev/rdsk/cxtxdxsx: (y/n) &quot;</font><font size=3 face="sans-serif"> </font>
<br>
<br><font size=2 face="sans-serif">Thanks In Advance.</font><font size=3 face="sans-serif"> </font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Doug</font>
<br>
--=_alternative 007CAFBA86256AD8_=--
Received on Mon Oct 1 23:40:38 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:32 EDT