Summary: newfs
2007-12-24 20:54:00
--=_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 at raytheon.com>
Sent by: codeprof-admin at codeprof.com
09/28/01 01:05 PM
To: codeprof at codeprof.com
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 < $inputfile (Input file has a "y" in it)</font>
<br>
<br><font size=2 face="sans-serif">newfs /dev/rdsk/cxtxdxs0 << EOF y EOF</font>
<br>
<br><font size=2 face="sans-serif">newfs /dev/rdsk/cxtxdxs0 << END y END</font>
<br>
<br><font size=2 face="sans-serif">newfs /dev/rdsk/cxtxdxs0 < /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>"Doug S Johnson" <Doug_S_Johnson at raytheon.com></b></font>
<br><font size=1 face="sans-serif">Sent by: codeprof-admin at codeprof.com</font>
<font size=1 face="sans-serif">09/28/01 01:05 PM</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: codeprof at codeprof.com</font>
<br><font size=1 face="sans-serif"> cc: </font>
<br><font size=1 face="sans-serif"> Subject: 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 "y" to the question below within the script?</font><font size=3 face="sans-serif"> </font>
<br>
<br><font size=2 face="sans-serif"> "construct a new file system /dev/rdsk/cxtxdxsx: (y/n) "</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"> Doug</font>
<br>
--=_alternative 007CAFBA86256AD8_=--
Comments
Got something to say?
You must be logged in to post a comment.

