Sponsored Content
Top Forums Shell Programming and Scripting How can I fetch few parameters in Shell script? Post 302910216 by Palak Sharma on Wednesday 23rd of July 2014 05:49:30 AM
Old 07-23-2014
Thanks a bunch Smilie can you help me further.

I have stored the output in a file called
Code:
Instances

The instances file has this detail:


Code:
INSTANCE ID         INSTANCE TYPE        INSTANCE STATE
i-8					t1.micro			  running
i-5					m3.medium			  running
i-b					m3.large			  running
i-e					m3.medium			  running
i-3					t1.micro			  running

I want to have a check that if the instance type is not t1.micro or t2.micro and the state is running then it should stop the instances with command
Code:
 ec2-stop-instances  instance id


How can I implement this ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help me in sending parameters from sqlplus script to unix shell script

Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files.. Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this? Please tell me... (2 Replies)
Discussion started by: Hara
2 Replies

2. Shell Programming and Scripting

Accessing the parameters of a shell script

Hi, I have one situation. I am developing a shell script to which parameters will be passed from a Web based User Interface using some Business Process(BP).There are some 6 parameters for which user will enter the values in UI. These values will be passed to script by BP in the form -... (2 Replies)
Discussion started by: The Observer
2 Replies

3. Shell Programming and Scripting

fetch hostname and instance name using shell script

Hi All, Requirement is to fetch hostname and instance name using shell script from all configuration files on a server R12 on IBM AIX... could anyone please share such an experience encountered before.Is there such a script available in this forum or any other site.. Thanks for your time!... (0 Replies)
Discussion started by: a1_win
0 Replies

4. Shell Programming and Scripting

How to fetch data from oracle in unix shell script

Hi, How to fetch data from oracle database in unix shell scripting. list=`sqlplus -s ds_user/dsuser@EMI <<EOF set feedback off set serveroutput on set heading off set pagesize 0 set tab off select IP_ID from table / exit EOF` The output is not what i expected.I need output in... (4 Replies)
Discussion started by: Anusha_Reddy
4 Replies

5. Shell Programming and Scripting

call another shell script and pass parameters to that shell script

Hi, I basically have 2 shell scripts. One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system. Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn. ... (2 Replies)
Discussion started by: sunrexstar
2 Replies

6. UNIX for Dummies Questions & Answers

shell script with parameters?

hi , I wanted to create a script, and I have no idea how to, and I would appreciate any help on that. Any advice on solving this is welcome. Thanks Here it goes: make a shell script in bash that show the activity of users. The results should be a summary or a complete report in a file.... (2 Replies)
Discussion started by: ubu-user
2 Replies

7. Programming

csh: Parameters in Shell Script Help

I have a program that is designed to take the first parameter (a file extension) and use it to rewrite the file stored in the second paramerter with the new extension. And if the current file does not exist then the program will print an error message "No such file." For example, my program is... (1 Reply)
Discussion started by: Marhsall34
1 Replies

8. Shell Programming and Scripting

Fetch the latest filename shell script

Hi I want to fetch the latest file form the list example example= filename RATE_STATE_SETUPS.20151222.ccyymmdd.hhmmss.txt File pick which have latest ccyymmdd.hhmmss list of file in directory are RATE_STATE_SETUPS.20151222.20151222.170101.txt... (5 Replies)
Discussion started by: MOHANP12
5 Replies

9. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies

10. UNIX for Beginners Questions & Answers

Shell script to fetch values in csv

I need to fetch below values from this file. (1 Reply)
Discussion started by: nit42
1 Replies
DOVEADM-INSTANCE(1)						      Dovecot						       DOVEADM-INSTANCE(1)

NAME
doveadm-instance - Manage the list of running Dovecot instances SYNOPSIS
doveadm [-Dv] [-f formatter] instance list doveadm [-Dv] instance remove name | base_dir DESCRIPTION
The doveadm instance commands are used to manage the list of Dovecot instances running on the server. In most installations there is only one Dovecot instance, but in some cases is may be useful to have more (e.g. running director proxy and backend in the same server). Instances are added to the list automatically when Dovecot is started. Each instance is uniquely identified by its base_dir setting. Instances can be named by setting instance_name in each instance's dovecot.conf. When an instance is named, it can be accessed easily by giving -i instance_name command line parameter for Dovecot binaries (e.g. doveadm). OPTIONS
Global doveadm(1) options: -D Enables verbosity and debug messages. -f formatter Specifies the formatter for formatting the output. Supported formatters are: flow prints each line with key=value pairs. pager prints each key: value pair on its own line and separates records with form feed character (^L). tab prints a table header followed by tab separated value lines. table prints a table header followed by adjusted value lines. -v Enables verbosity, including progress counter. ARGUMENTS
name The value of an instance's instance_name setting. base_dir The base directory of a Dovecot instance. COMMANDS
instance list doveadm instance list This command lists the seen Dovecot instances. instance remove doveadm instance remove name | base_dir This command removes the specified instance. REPORTING BUGS
Report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting bugs is avail- able at: http://dovecot.org/bugreport.html SEE ALSO
doveadm(1) Dovecot v2.1 2012-02-16 DOVEADM-INSTANCE(1)
All times are GMT -4. The time now is 09:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy