![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Read the csv file and assign the values in to variable | rajbal | Shell Programming and Scripting | 11 | 06-27-2009 01:17 PM |
| How to pass values from one file to different scripts | pssandeep | UNIX for Dummies Questions & Answers | 6 | 12-14-2007 07:14 PM |
| Read through a file and Pass system commands | systemali | Shell Programming and Scripting | 7 | 03-27-2006 03:14 AM |
| How can I read variable values from file? | redlotus72 | UNIX for Dummies Questions & Answers | 1 | 03-14-2005 05:38 AM |
| read a file as input and pass each line to another script | sajjad02 | Shell Programming and Scripting | 0 | 09-24-2004 11:13 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how do I pass or read values from file ?
Hi one & All ,
My Need is to Create 64 Partition and create File System in Linux. I have the Script ... for((a=0;a<=63;a++)) do fdisk /dev/cciss/c0d$a done for((a=0;a<=63;a++)) do mkfs.ext2 /dec/cciss/'c0d'$a'p1' done the moment I run the Script I get the Prompt ... Command (m for help) : n ( is the value I Enter ) command action e extended p primary partition (1-4) p ( is the Value I Enter) partition number (1-4) : 1 First cylinder (1-251, default 1): 1 Last cylinder or +size or +sizeM or +sizeK (1-251, default 251): 251 command ( m for help) :w So as you see , I Basically provide 64 times the Values n p 1 1 251 w please help ,is there way i can pass these Values in loop so I dont have to Enter Manually ![]() I'm still @ Learning , so would be grateful if some GURU here helps ![]() Regards |
|
||||
|
Put the things you type in a file (1 thing on 1 line) und use like
fdisk /dev/whatever < filename Other option would be to use sfdisk (scriptable fdisk replacement) which is amoung other things able to "nuke in" a new partition table with one command. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|