07-20-2013
Show us the KSH script that you created.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies
2. Shell Programming and Scripting
Hi All,
I have a file like this,
data1,data2,,,data5,data6.
i want to write a shell script to replace data3 with "/example/string". which means my data file should look like this .
data1,data2,example/string],,data5,data6.
Could you guys help me to get a sed command or any other command... (8 Replies)
Discussion started by: girish.raos
8 Replies
3. Shell Programming and Scripting
Hi,
I need to match lines after a pattern, upto the first blank line.
Searched in web and some forums but coulnt find the answer.
where <restart_step> =
10 -- Execute query
20 -- Write the contents to the Oracle table
30 -- Writing Contents to OUTPUT... (7 Replies)
Discussion started by: justchill
7 Replies
4. Shell Programming and Scripting
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Discussion started by: venu
3 Replies
5. Shell Programming and Scripting
I have a shell script which I made with the help of this forum
#!/bin/sh
RuleNum=$1
cat bw_rules | sed 's/^.*-x //' | awk -v var=$RuleNum '$1==var {for(i=1;i<=NF;i++) {if($i=="-bwout") print $(i+3),$(i+1)}}'
Basically I have a pages after pages of bandwidth rules and the script gives... (0 Replies)
Discussion started by: sb245
0 Replies
6. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
7. Shell Programming and Scripting
Hi all
I have following file which I have to edit for research purpose
file:///tmp/moz-screenshot.png body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; } Drug: KRP-104 QD Drug: Placebo Drug: Metformin|Drug:... (15 Replies)
Discussion started by: Priyanka Chopra
15 Replies
8. Shell Programming and Scripting
Hi All,
From the below line if we want to display all the text till found pattern dot/. I was trying with the below code but couldn't able
to print text before the pattern. it display texts which is found after pattern.
awk '/assed/{print;getline;print}' file_name | sed 's/^*. *//'
input... (4 Replies)
Discussion started by: Optimus81
4 Replies
9. Shell Programming and Scripting
Input file.
GMDCOM.27936 : Process Request <36812974>
GMDCOM.27936 : Process Request <36812985>
GMDCOM.27936 : Process Request <36812986>
GMDCOM.27936 : Process Request <36812987>
GMDCOM.27936 : Process Request <36812996>
GMDCOM.27936 : Process Request <36812998>
GMDCOM.27936 : Process... (14 Replies)
Discussion started by: ghosh_tanmoy
14 Replies
10. Shell Programming and Scripting
Hi All,
Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool.
Wraper script am trying is to do with above metion 2 files.
utility tool accepts :
a. userinfo file : which contains username
b. item file : which... (2 Replies)
Discussion started by: Optimus81
2 Replies
LEARN ABOUT DEBIAN
xen-delete-image
XEN-DELETE-IMAGE(8) Perl Programmers Reference Guide XEN-DELETE-IMAGE(8)
NAME
xen-delete-image - Delete previously created Xen instances.
SYNOPSIS
xen-delete-image [options] [--hostname=]imageName1 [--hostname=]imageName2
Help Options:
--help Show help information.
--manual Read the manual for this script.
--version Show the version information and exit.
--verbose Show diagnostic output.
General options:
--dir Specify the output directory where images were previously saved.
--evms Specify the EVMS container to use.
--lvm Specify the LVM volume to use.
Specifying hosts:
--hostname Specify the image name to delete.
Testing options:
--test Don't complain if we're not invoked by root.
OPTIONS
--dir Specify the output directory where images were previously saved.
--evms Specify the EVMS container where images were previously saved.
--help Show help information.
--hostname Specify the hostname to delete.
--lvm Specify the LVM volume group where images were previously saved.
--manual Read the manual for this script.
--test Do not complain, or exit, if the script is not executed by the root user.
--version Show the version number and exit.
DESCRIPTION
xen-delete-image is a simple script which allows you to delete
Xen instances which have previously been created by xen-create-image.
You must be root to run this script as it removes the Xen configuration
file from /etc/xen and potentially removes LVM and EVMS volumes.
(When invoked with the '--test' flag the script will continue running,
but will fail to remove anything which the user does not have permission
to delete.)
LOOPBACK EXAMPLE
Assuming that you have three images 'foo', 'bar', and 'baz', stored
beneath /home/xen the first two may be deleted via:
xen-delete-image --dir=/home/xen foo bar
You may also delete them by running:
xen-delete-image --dir=/home/xen --hostname=foo --hostname=bar
(The matching Xen configuration files beneath /etc/xen will also be
removed.)
LVM EXAMPLE
Assuming that you have the volume group 'skx-vol' containing three
Xen instances 'foo', 'bar', and 'baz' the first two may be deleted via:
xen-delete-image --lvm=skx-vol foo bar
This will remove the volumes 'foo-disk', 'foo-swap', 'bar-disk',
and 'bar-swap'.
Note that if the images were created with "--noswap" then the swap
volumes will not be present, so will not need to be deleted.
The Xen configuration files will also be removed from beneath /etc/xen.
EVMS EXAMPLE
Assuming that you have the container 'mycontainer' containing three
Xen instances 'foo', 'bar', and 'baz' the first two may be deleted via:
xen-delete-image --evms=lvm2/mycontainer --hostname=foo --hostname=bar
This will remove the volumes 'foo-disk', 'foo-swap', 'bar-disk',
and 'bar-swap'.
Note that if the images were created with "--noswap" then the swap
volumes will not be present, so will not need to be deleted.
The Xen configuration files will also be removed.
AUTHORS
Steve Kemp, http://www.steve.org.uk/
Axel Beckert, http://noone.org/abe/
StA~Xphane Jourdois
LICENSE
Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools Development Team. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the
full text of the license.
4.3.1 2012-06-30 XEN-DELETE-IMAGE(8)