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
my code:
Last edited by Franklin52; 08-07-2012 at 06:53 AM..
Reason: Please use code tags for data and code samples
Hi All,
I am trying to schedule a one time job using the at command with the help of shell script for my project. The shell script should take a parameter as a command line argument from the at command itself. Is it possible to take a command line parameter for a shell script in the command... (3 Replies)
Hi,
Iam using Solaris 10 OS in the server.iam unable to find expect command in bin directory.how can i install the script in the server to use "expect" in shell programming. (1 Reply)
Hi,
I using the "nail" command to send an attachement,the command is :
nail -s TEST -a $param/Result.html xyz@yahoo.com </dev/null
but now my requirement is changed, I have to send two attachments,through the same mail.. :rolleyes:
I have tried this:
nail -s TEST -a $param/*.html... (1 Reply)
I wrote some expect script to telnet to some device to execute some commands.Firstly,I can't get full result some time,then I try to add some "sleep" command in it.Fortunately it works.
My idea about it is that it uses sleep command to wait the result to be displayed.Am I right or correct the... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank).
In a first approach I coded:
find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt
But this doesn't work. I got an error (under Ubuntu):
grep:... (5 Replies)
I'm trying to execute something like this:
exec perl -i -pe 's/\015/\012/g' '${file}'
in my expect script and I get:
error "invalid command name \"perl\".
however, if I run
perl -i -pe 's/\015/\012/g' "/Users/Shared/menu-items.txt"
directly in my terminal, it runs fine. I'm an... (4 Replies)
Hello All,
I am writing an Expect Script to execute some commands over ssh then exit the script.
The script works just fine if I automate everything and assuming the correct password was entered.
So this Expect Script gets executed from a Bash script... From the Bash script I pass along an... (0 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi All,
i am trying to ssh to a remote machine and execute certain command to remote machine through script.
i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as
expect: spawn id exp5 not open
while executing
"expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies
LEARN ABOUT SUSE
pvresize
PVRESIZE(8) System Manager's Manual PVRESIZE(8)NAME
pvresize - resize a disk or partition in use by LVM2
SYNOPSIS
pvresize [-d|--debug] [-h|--help] [-t|--test] [-v|--verbose] [--setphysicalvolumesizesize] PhysicalVolume [PhysicalVolume...]
DESCRIPTION
pvresize resizes PhysicalVolume which may already be in a volume group and have active logical volumes allocated on it.
OPTIONS
See lvm(8) for common options.
--setphysicalvolumesize size
Overrides the automatically-detected size of the PV. Use with care, or prior to reducing the physical size of the device.
EXAMPLES
Expand the PV on /dev/sda1 after enlarging the partition with fdisk:
pvresize /dev/sda1
Shrink the PV on /dev/sda1 prior to shrinking the partition with fdisk (ensure that the PV size is appropriate for your intended new parti-
tion size):
pvresize --setphysicalvolumesize 40G /dev/sda1
RESTRICTIONS
pvresize will refuse to shrink PhysicalVolume if it has allocated extents after where its new end would be. In the future, it should relo-
cate these elsewhere in the volume group if there is sufficient free space, like pvmove does.
pvresize won't currently work correctly on LVM1 volumes or PVs with extra metadata areas.
SEE ALSO lvm(8), pvmove(8), lvresize(8), fdisk(8)Sistina Software UK LVM TOOLS 2.02.67(2) (2010-06-04) PVRESIZE(8)