02-06-2009
validate input
the user inputs names that have to be inside square brackets
[John,Dan]
I want to check if the user puts the brackets and if not ask him to re-enter the names
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
This may have been addressed already somewhere, however I am looking for the easiest/shortest way to validate a response from a user for a file name.
The file name should not have any of the following characters
~`!@#$%^&*()_-+={|\:;"'<,>.?/
Further the response should not have any... (2 Replies)
Discussion started by: jerardfjay
2 Replies
2. Shell Programming and Scripting
Hi
How would i validate value of a variable whether it is number,date or string
Thanks in advance
Sas (5 Replies)
Discussion started by: SasDutta
5 Replies
3. Shell Programming and Scripting
Hi all,
I have a shell script(K shell) which takes a date as input.
i want the input to be in DD-MM-YYYY format.
Can i enforce such a format of input string using just one line of code?
OR
do i need to parse the input date into different components and test them using Case statements... (2 Replies)
Discussion started by: rajugp1
2 Replies
4. Shell Programming and Scripting
Hi,
This will most likely be a simple answer.
Currently I have a situation where my script will be sent various options:
-o1 -o2 -oe3@somthing.com
Now, if I want to run a certain command based on the option I am sent, I am doing the following.
for o in $(echo $options)
do
if
... (3 Replies)
Discussion started by: stuaz
3 Replies
5. Shell Programming and Scripting
Hi,
I wonder how I can know if the input parameters to the script are numbers or text
Thanks (11 Replies)
Discussion started by: Gengis-Kahn
11 Replies
6. Shell Programming and Scripting
I'm writing a bash shell script to 'help' me post to susepaste (I can NEVER remember the time options).
Here's the code:
#!/bin/bash
##########
#
# Project : personal script.
# Started : Wed Aug 03, 2011
# Author : Habitual
# Description : susepaste c-li script with user... (5 Replies)
Discussion started by: Habitual
5 Replies
7. Shell Programming and Scripting
Is there an easy way to validate an input field size. Let us say a script is asking to enter 10 digits mobile number, how do I write a script to validate it is numeric and is 10 digits in length? I just need an easy way w/o using looks ...etc. Is there such a away ?
Here is what I have so far... (6 Replies)
Discussion started by: mrn6430
6 Replies
8. Shell Programming and Scripting
$Input_filename=$ARGV;
if (!-d $Input_filename && ! -e $Input_filename)
{
print "USAGE: Please enter '$ABCD/def/dsed.txt' as an arguement \n";
exit;
}
1. Input Is suppose to be something like "$ABCD/def/dsed.txt".
if the input is wrong the script should throw an ERROR message.... (2 Replies)
Discussion started by: Rashid Khan
2 Replies
9. Shell Programming and Scripting
We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not.Inputfile formatsrc_sps_d_Call_Center_Reporting_yyyymmdd_01.dat SPS-Service nameYYYY-yearMM-MonthDD-dayLike above we will get n number of files for... (1 Reply)
Discussion started by: katakamvivek
1 Replies
10. Shell Programming and Scripting
We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not.
Daily client will place the files in a particular path.Below files which I need to process for 04/01/2013(Load date).... (2 Replies)
Discussion started by: katakamvivek
2 Replies
LEARN ABOUT REDHAT
nwgrant
NWGRANT(8) nwgrant NWGRANT(8)
NAME
nwgrant - Add Trustee Rights to a directory
SYNOPSIS
nwgrant [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ -o object name ] [ -t type ] [ -r rights ] file/directory
DESCRIPTION
nwgrant adds the specified bindery object with the corresponding trustee rights to the directory.
nwgrant looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information.
Please note that the access permissions of $HOME/.nwclient MUST be 600 for security reasons.
OPTIONS
-h
-h is used to print out a short help text.
-S server
server is the name of the server you want to use.
-U user
user is the user name to use for login.
-P password
password is the password to use for login. If neither -n nor -P are given, and the user has no open connection to the server, nwgrant
prompts for a password.
-n
-n should be given if no password is required for the login.
-C
By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off
this conversion by -C.
-o object name
The name of the object to be added as trustee.
-t object type
The type of the object. Object type must be specified as a decimal value. Common values are 1 for user objects, 2 for group objects and
3 for print queues. Other values are allowed, but are usually used for specialized applications. If you do not specify object type,
object name is taken as NDS name.
-r rights
You must tell nwgrant which rights it should grant to the bindery object. The new rights for the object is specified by rights, which
can be either a hexadecimal number representing the sum of all the individual rights to be granted or a string containing characters
representing each right. If rights are represented in string format then the string must be bounded with square brackets. Characters
within the brackets may be in any order and in either case. Spaces are allowed between the brackets - in which case the entire string
should be quoted. Hexadecimal and character values for the rights are shown in this table:
00 = no access
01 = read access = R
02 = write access = W
08 = create access = C
10 = delete access = E
20 = ownership access = A
40 = search access = F
80 = modify access = M
100 = supervisory access = S
for a possible total of "1fb" or "[SRWCEMFA]" for all rights.
file/directory
You must specify the directory to which to add the object as trustee. This has to be done in fully qualified NetWare notation.
Example:
nwgrant -S NWSERVER -o linus -t 1 -r fb 'data:homelinus'
With this example, user linus is given all rights except supervisory to his home directory on the data volume. This example assumes the
existence of the file $HOME/.nwclient.
nwgrant -o linus -t 1 -r fb /home/linus/ncpfs/data/home/linus
With this example, user linus is given all rights except supervisory to his home directory on the data volume. This example assumes that
NWSERVER is already mounted on /home/linus/ncpfs mountpoint.
AUTHORS
nwgrant was written by Volker Lendecke with the corresponding NetWare utility in mind. See the Changes file of ncpfs for other contribu-
tors.
nwgrant 5/19/2000 NWGRANT(8)