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 OPENSOLARIS
quota
quota(1M) System Administration Commands quota(1M)
NAME
quota - display a user's ufs file system disk quota and usage
SYNOPSIS
quota [-v] [username]
DESCRIPTION
quota displays users' UFS disk usage and limits. Only the super-user may use the optional username argument to view the limits of other
users.
quota without options only display warnings about mounted file systems where usage is over quota. Remotely mounted file systems which do
not have quotas turned on are ignored.
username can be the numeric UID of a user.
OPTIONS
-v Display user's quota on all mounted file systems where quotas exist.
USAGE
See largefile(5) for the description of the behavior of quota when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
FILES
/etc/mnttab list of currently mounted filesystems
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
edquota(1M), quotaon(1M), quotacheck(1M), repquota(1M), rquotad(1M), attributes(5), largefile(5), zones(5)
NOTES
quota displays quotas for NFS mounted UFS-based file systems if the rquotad daemon is running. See rquotad(1M). In a zones(5) environment,
quota displays quotas only for the zone in which it is invoked.
quota can display entries for the same file system multiple times for multiple mount points. For example,
# quota -v user1
might display identical quota information for user1 at the mount points /home/user1, /home/user2, and /home/user, if all three mount points
are mounted from the same file system with quotas turned on.
SunOS 5.11 11 Nov 2008 quota(1M)