Ask a Question related to Sun Solaris, Design and Development.
-
DukeNM #1
using the 'format' command non-interactively in a script
hi ,
i am a bit new to solaris. but anyways i just wanted to use the format
command and have the disk-status into a file
ie. if i give
format -d c0t1d0
it would give a menu
now if i type 'verify'
the output which would be generated is what i want to be redirected to
a log/txt file..
i wanted this so that a script would inwoke the format and send the
'verify' output to the log file.
any way to do this.
DukeNM Guest
-
Using tell taget command in slideshow format
I am using flash mx 2004 professional on a win2k system. I am currently using one of the new features exclusive to the pro version called slideshow.... -
My Script to run a Command-Line from ASP does not work
Hi, My Script to run a Command-Line from ASP does not work. No errors are returned either. It is on IIS. The directory where the script exists is... -
script+file format
Hello, I am looking for a perl script to detect and display a format of file (i.e. unix, dos or mac). I will be very grateful to you to help... -
kill command in a perl script
I just started learning Perl and I am trying to do followings; ps -ef | grep java >pidfile In pidfile, there are 3 PIDs for weblogic processes. ... -
Windows Explorer Right Click Command (+ Custom Command Script)
Ok got a tricky question about custom scripts, I would like to add a Windows Explorer Right Click Command - that allows me to select an image/s... -
Tony Walton #2
Re: using the 'format' command non-interactively in a script
DukeNM wrote:
> ... a script would inwoke the format and send the
> 'verify' output to the log file.
>
> any way to do this.
Something along the lines of
echo "verify" | format -d c0t1d0 > /tmp/format.log perhaps?
Tony
Tony Walton Guest
-
stefan #3
Re: using the 'format' command non-interactively in a script
[email]tridentadm@netscape.net[/email] (DukeNM) wrote in message news:<6b07a80.0307310215.78aa3cc9@posting.google.c om>...
Try something like that ( it is not smart, but it works) :> hi ,
> i am a bit new to solaris. but anyways i just wanted to use the format
> command and have the disk-status into a file
> ie. if i give
> format -d c0t1d0
> it would give a menu
> now if i type 'verify'
> the output which would be generated is what i want to be redirected to
> a log/txt file..
>
> i wanted this so that a script would inwoke the format and send the
> 'verify' output to the log file.
>
> any way to do this.
echo " " >> $Z
echo "--------------------------------- " >> $Z
echo "-------- format -------- " >> $Z
echo "--------------------------------- " >> $Z
echo " " >> $Z
echo "disk" > /tmp/InputFile.$$
/usr/sbin/format -f /tmp/InputFile.$$ >> $Z 2>&1
/usr/bin/rm /tmp/InputFile.$$
echo " " >> $Z
echo " " >> $Z
echo "--------------------------------- " >> $Z
echo "- 1. int. Disk: partition table - " >> $Z
echo "--------------------------------- " >> $Z
echo " " >> $Z
file=/tmp/file$$
# get the first internal disk's name
echo "disk 0 q" > $file
set -- `format -f $file | grep selecting`
a=`echo $2`
# get the first internal disk's partition table
echo "format $a <<EOF" > $file
echo "p" >> $file
echo "p" >> $file
echo "q" >> $file
chmod 700 $file
$file >> $Z 2>&1
rm $file
echo " " >> $Z
stefan Guest



Reply With Quote

