Sponsored Content
Top Forums Shell Programming and Scripting Problem in sending inputs to format command using expect Post 302786043 by chidori on Tuesday 26th of March 2013 05:50:37 PM
Old 03-26-2013
ok , i was able to fix that. btw. can you please let me know how to process pattern that is reptitive . for example

I am setting Free Hog paritition and i have to enter the size of each partition and it would be set to zero. should i create 7 expect function lines and each time send value 0 to it or is there any other way in expect tool ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with mailx command when sending attachment.

Hi, I have tried to sent a mail with body and attachment. But the shell script got hanging while executing that command. The command is "(cat body;uuencode att1.csv)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com" where body is a file having a single line.... (2 Replies)
Discussion started by: miltony
2 Replies

2. Shell Programming and Scripting

Checking the format of inputs in a file

Hi, I have a script that takes the contents of another file as inputs. Its assumed that there are 3 values in the input file that are seperated by '|'. I have to check in my script, whether the filed seperator used in the input file is '|' or not. If its not a '|' I have to print a error... (13 Replies)
Discussion started by: sendhilmani123
13 Replies

3. UNIX for Advanced & Expert Users

better format for sending mail

i am using a script to create a file which contains the mail to be sent.in every steo this file grts appended through out the script using several variables.now i want to convert it into html format so that the mail will have better look and feel and the font color and size can be changed. i tried... (3 Replies)
Discussion started by: dr46014
3 Replies

4. Shell Programming and Scripting

Problem with while reading HTML inputs

Hi All, I am not able to read my HTML form inputs properly in my script. I have a textarea in my form where user needs to enter sql query... but when user enter query like below : select * from order_queue where NUM_OF_PICKUP >=3 and TRANSACTION_TYPE=4 ; its coming like : select 171_arc... (3 Replies)
Discussion started by: askumarece
3 Replies

5. Shell Programming and Scripting

Expect: run a command first before sending

Hello Expect experts, Is it possible with Expect to run a command first when an expected phrase is outputted by a spawned program? Before sending an answer to the spawned program that is... Thanks a lot. (2 Replies)
Discussion started by: Tr00tY
2 Replies

6. Shell Programming and Scripting

Query on sending inputs to a running application

Hi I need a help for below : I am running an application XXXX , and when it starts i am passing a file name called "connect.spb" and after the application connects to the server i am sending filename "accept.spb" as a parameter. DL385:$ ./XXXX This is XXXX (Reproducer by Order or RelaY) ... (1 Reply)
Discussion started by: srkelect
1 Replies

7. Shell Programming and Scripting

Sending test pass to a folder in expect

still new to this expect useing bach shell to cammand expect script i tink i have that right! i want to have the test im running upon every complted cycle copyed to a folder. cant seem to get it to work. Ive tryed log_file -a $globallogdir/deveoper.log proc dbglog {notsure what... (0 Replies)
Discussion started by: melvin
0 Replies

8. Shell Programming and Scripting

Expect Script sending password with $ and symbols

All, I am trying to use expect to send SFTP password because I am unable to share a key with the vendor. They gave me a password that uses some symbols in it like $ and ! When i try to use the send command in expect it thinks the $ is a variable. Is there anyway to have it send the... (2 Replies)
Discussion started by: markdjones82
2 Replies

9. Shell Programming and Scripting

sending content of a file in Expect

How Can I send the content of a file in Expect? Do I have to use cat command in a way? if yes how? lets say my file is called 1.txt. example: expect "Enter command to send:" {send "???? \r"} ???? --> content of the file 1.txt (1 Reply)
Discussion started by: alireza6485
1 Replies

10. Shell Programming and Scripting

problem in automating "fdisk" command using send and expect

hi i want to automate fdisk command . i spawned a process containing fdisk command from a process and tried to send the options to fdisk promt from that process. but that spawed process is notstarting itself help me out trying for two days :wall: my code: #!/bin/bash echo... (5 Replies)
Discussion started by: jagak89
5 Replies
PDISK(8)						    BSD System Manager's Manual 						  PDISK(8)

NAME
pdisk -- Apple partition table editor SYNOPSIS
pdisk [-h | --help] [-v | --version] [-l | --list] [[name ...]] pdisk [r | -readonly] device ... DESCRIPTION
pdisk is a menu driven program which partitions disks using the standard Apple disk partitioning scheme described in "Inside Macintosh: Devices". It does not support the intel/dos partitioning scheme supported by fdisk. device is of the following form: /dev/disk0s /dev/disk0s1 etc. OPTIONS
-v | --version Prints version number of the pdisk program. -h | --help Prints a rather lame set of help messages for the pdisk program. -l | --list If no names are present then lists the partition tables for /dev/disk0s, /dev/disk0s1, /dev/disk0s2, and so on. Otherwise, lists the partition tables for the specified names. -r | --readonly Prevents pdisk from writing to the device. Editing Partition Tables An argument which is simply the name of a device indicates that pdisk should edit the partition table of that device. The current top level editing commands are: h command help p print the partition table P (print ordered by base address) i initialize partition map s change size of partition map c create new partition C (create with type also specified) d delete a partition r reorder partition entry in map w write the partition table q quit without saving changes Commands which take arguments prompt for each argument in turn. You can also type any number of the arguments separated by spaces and those prompts will be skipped. The only exception to typeahead are the confirmation prompts on the i and w commands. The idea being that if we expect you to confirm the decision we shouldn't undermine that by allowing you to be precipitate about it. Partitions are always specified by their number, which the index of the partition entry in the partition map. Most of the commands will change the index numbers of all partitions after the affected partition. You are advised to print the table as frequently as necessary. Creating more than fifteen partitions is not advised. There is currently a bug in the some (all?) of the kernels which causes access to the whole disk fail if more than fifteen partitions are in the map. The c (create new partition) command is the only one with complicated arguments. The first argument is the base address (in blocks) of the partition. Besides a raw number, you can also specify a partition number followed by the letter 'p' to indicate that the first block of the new partition should be the same as the first block of that existing free space partition. The second argument is the length of the parti- tion in blocks. This can be a raw number or can be a partition number followed by the letter 'p' to use the size of that partition or can be a number followed by 'k', 'm', or 'g' to indicate the size in kilobytes, megabytes, or gigabytes respectively. (These are powers of 1024, of course, not powers of 1000.) The last argument is the name of the partition. This can be a single word without quotes, or a string sur- rounded by single or double quotes. The C command is identical to the c command, with the addition of a partition type argument after the other arguments. The r (reorder) command allows the index number of partitions to be changed. The index numbers are constrained to be a contiguous sequence. The i (initialize) command prompts for the size of the device. This was done to get around a bug in the kernel where it reports the wrong size for the device. The w (write) command does write the partition map out. BUGS
pdisk should be able to create HFS partitions that work. Even more help should be available during user input. Darwin March 24, 2001 Darwin
All times are GMT -4. The time now is 02:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy