8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Unix Gurus,
i am on learning path of unix, and yet to discover many things. I came across with this requirement where i need to pass parameters but the position of parameters is not fixed so after doing some google search got to know "getopts" can handle that. So here is my code:
function... (3 Replies)
Discussion started by: gnnsprapa
3 Replies
2. Shell Programming and Scripting
Hi Guys,
I have created a script for our automated DB creation, it works fine with default option(-d).
$ ./test_db.ksh -d abc 11 dev
-d is Default option
ORACLE_SID=abc
ORACLE_VERSION=11
ENV_TYPE=dev
For creating a customized DB, i thought of giving the user different options.... (8 Replies)
Discussion started by: veeresh_15
8 Replies
3. Shell Programming and Scripting
I have a requirement where I need to process both options and parameters.
command line call
ie xxx.ksh -sid TEST1 -search_str LOCKED user1 user2 .....
I am using the following peice of code but I am usure how I can loop through all my parameters user1, user2, ... Note at the minium... (2 Replies)
Discussion started by: BeefStu
2 Replies
4. Shell Programming and Scripting
Hi,
Does the order of argument and non-argument command line parameters matter to getopts?
with a getopts line in my script of
getopts p:cs opt
a command line of <script> -p 5 -s
only picks up the -p option, while <script> -s -p 5 picks up both.
Removing the space between the p and the... (3 Replies)
Discussion started by: rojomoke
3 Replies
5. Shell Programming and Scripting
Is it possible to get a script that uses getopts to accept options and arguments in any order?
eg. -g -h 2 4 works like -g 2 -h 4. (1 Reply)
Discussion started by: lee.n.doan
1 Replies
6. Programming
Hi, this is my problem
I have script with two parameters -n name and -s surname. Both have arguments and I want to know how parse these parameters with getopts. When you write
./names -n John -s White
it find you all persons, which name is John White, but when you write
./names -n John ... (1 Reply)
Discussion started by: frees
1 Replies
7. AIX
Hello,
On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command.
tunrestore -R is present in inittab
in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log
... (0 Replies)
Discussion started by: dantares
0 Replies
8. Shell Programming and Scripting
Hi there.
Could someone explain how do i get the options separated from the arguments. My problem is that i have a lot of options and in all of those options i need to have the parameters available to use in that option and all the others. How can i take the arguments before i cycle throw the... (4 Replies)
Discussion started by: KitFisto
4 Replies