02-25-2013
let me try to make you understand.
Situation 1: The user only inputs "Weblogic" Then the $2, $3 $4 are the pid, username and password for weblogic [./script.sh weblogic 34522 user1 pswd]
Situation 2: If the user Enters both Apache and Weblogic then $4, $5, $6 are the pid username and password [./script.sh apache /opt/apache22 weblogic 34522 user1 pswd].
Also, I mentioned that weblogic input can be 3 or 5 params long.
How will this be achieved ?
Last edited by mohtashims; 02-25-2013 at 09:36 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
am a new learner to shell programming.
i have a script which will prompt for user to key in their name & display their name afterwards.
script
=====
echo "Pls enter your name:"
read name
echo "Your name is $name."
output
=====
Pls enter your name:
Bob
Your name is Bob.
what... (2 Replies)
Discussion started by: newbie168
2 Replies
2. Shell Programming and Scripting
Bash : how do i check the user input and make sure is only character or only number ? (7 Replies)
Discussion started by: CheeSen
7 Replies
3. Shell Programming and Scripting
Hello All,
I am stuck with the follwing problem , pls give me some advice..
Input file:
input clock;
input reset; \\reset all
input yuv;
//input comment
output sur;
output sud;
output vtua;
output tur;
input ebi;
//output comment
The input file... (1 Reply)
Discussion started by: user_prady
1 Replies
4. UNIX for Dummies Questions & Answers
Hello everybody!!!
I am writing my own rm command in unix.
I prompt the user to type if he wants to delete a file and then read what he typed.
But how do i check what he typed?
This is my program so far:
echo 'Delete prog1.c (y/n)?'
read yesOrNo
if yesOrNo == 'y'
then
rm prog1.c... (6 Replies)
Discussion started by: mskart
6 Replies
5. Shell Programming and Scripting
Trying to create a script/executable to replace "abc" text string in "myfile.htm" with input from a pop-up field. For example, launch this thing and a prompt is popped up asking the user to input what "abc" should be replaced with, then it inserts what the user inputs in place of abc in the... (3 Replies)
Discussion started by: mike909
3 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
(o) Checkout an auto part: should prompt the user for the name of the auto part
and borrower's name:
Name:... (2 Replies)
Discussion started by: SlapnutsGT
2 Replies
7. Homework & Coursework Questions
Good Evening. I'm new to C. Can you please help me.
I'm creating an error checking function, user will input a string, this will check if the input is all alphabet or all letters only. If there is a digit or other special char, it will print Error then ask input from user again.
Here's my... (1 Reply)
Discussion started by: eracav
1 Replies
8. Shell Programming and Scripting
Hi,
I need my script to check if the user enters 3 values if not 5 values to my script and alert if the input has any other number of values.
for example:
./myscript.sh 22 56 3221 - > correct
./myscript.sh 22 56 3221 45 777 -> correct
./myscript.sh 22 56 3221 45 -> incorrect
Please... (6 Replies)
Discussion started by: mohtashims
6 Replies
9. Shell Programming and Scripting
How to check the user input to be valid using shell script?
The valid input is in the format like as follows.
1. It can only have r,w,x or a hyphen and nothing else.
2. ensure the r, w, x are in the correct order.
for example: rwxr-xr-x is a valid format.
Thanks (5 Replies)
Discussion started by: hyeewang
5 Replies
10. Shell Programming and Scripting
Hi All,
#!/bin/bash
#Just trying to check if letters are in the user input. Any tips?
# I have tried regexp and using 0-9 etc, i cannot get this to work either in just an if statement or while in a loop.
echo "Please pick a number"
read num
if ; then
echo "Please enter a number"... (7 Replies)
Discussion started by: jvezinat
7 Replies
LEARN ABOUT LINUX
htdigest
HTDIGEST(1) htdigest HTDIGEST(1)
NAME
htdigest - manage user files for digest authentication
SYNOPSIS
htdigest [ -c ] passwdfile realm username
SUMMARY
htdigest is used to create and update the flat-files used to store usernames, realm and password for digest authentication of HTTP users.
Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by htdigest.
This manual page only lists the command line arguments. For details of the directives necessary to configure digest authentication in httpd
see the Apache manual, which is part of the Apache distribution or can be found at http://httpd.apache.org/.
OPTIONS
-c Create the passwdfile. If passwdfile already exists, it is deleted first.
passwdfile
Name of the file to contain the username, realm and password. If -c is given, this file is created if it does not already exist, or
deleted and recreated if it does exist.
realm The realm name to which the user name belongs.
username
The user name to create or update in passwdfile. If username does not exist is this file, an entry is added. If it does exist, the
password is changed.
SECURITY CONSIDERATIONS
This program is not safe as a setuid executable. Do not make it setuid.
Apache HTTP Server 2007-04-24 HTDIGEST(1)