Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format help 1

Status
Not open for further replies.

cndcadams

IS-IT--Management
Feb 11, 2004
725
US
Need some quick help from you guys. I would normally not ask for help on this but I am swamped and I know someone will be able to answer this in a second.

I want to redirect format command output to a file. My problem is when I run the my basic script for gathering system info the script does not end unless I execute a control-D. I know that the format command is causeing the issue because I removed that entry and the script worked fine.

The entry for format looks like this;

format >> system

I tried

format >> system >&- (to close STDOUT) but it did not work


Thanks

CA

 
If I am understanding correctly, something like this:

Code:
format <<EOF
0 [or any other selection for another disk]
p
p
EOF

That above would print the partition table for one of my disks on my server and then exit.

Is that what you were going for?

Regards,
Chuck
 
Chuck;

Thanks man, I just wanted the actual output of format command itself so I just did format <<EOF

perfect!!

CA
 
Annihilannic;

I was expecting you to respond to this. I figured you would be the first one but I am sure you were busy. Anyways thanks for the post. I had run that a long time ago but just could not remember it. I will document this in my cheat sheet for future reference.

Thanks again;

CA
 
If you just need to print the partition map for any drive, just use [tt]prtvtoc[/tt].
 
dandan123;

Thanks for the input. I have already sent out the script to our other offices but I can document this for future reference.

SamBones;

Thanks for your input. I am aware of that command and have used it. I will have to make sure this is on my cheat sheet.


My cheat sheet is used for a class I teach to techs who are new to solaris.

Thanks again;

CA


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top