02-02-2009
Quote:
Originally Posted by
Perderabo
Hi guys, I'm new in UNIX and need to validate a date
How can I call
datecalc script. from main shell?
is the same like to call another file with function, maybe
. ./datecalc_script.ksh
I tested it and dont run
thanks for your answers
grettings
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have one script.for that the inputs are fromdate(dd/mon/yyyy) and todate(dd/mon/yyyy).
How i can validate the input format?for eg.27/08/2008 is not valid.27/aug/2008 or 27/Aug/2008 are valid.
and the todate is optional.so if the todate is not present in the input then i need to assign the... (6 Replies)
Discussion started by: Sharmila_P
6 Replies
2. Shell Programming and Scripting
Hi,
I want to validate if the given input is a valid month (written in long month format)
Jan / Feb / Mar / Apr / May / Jun etc etc
This is what I've got with || (or statements):
#!/usr/bin/ksh
INPUT_DATE=$1
FORMATTED_DATE=`date | cut -f2 -d' '`
#If there's no input use the... (1 Reply)
Discussion started by: Batsies
1 Replies
3. Shell Programming and Scripting
the user inputs names that have to be inside square brackets
I want to check if the user puts the brackets and if not ask him to re-enter the names (9 Replies)
Discussion started by: DDoS
9 Replies
4. Shell Programming and Scripting
Hi..
I'm a newbie in KSH. Need help. How can I validate input date format in argument using format mm/dd/yy. Eg. > findlog.sh 12/30/09. Any info/help is highly appreciated. (3 Replies)
Discussion started by: harry0013
3 Replies
5. 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
6. Shell Programming and Scripting
how to check input date format.
for example $input_date must be in format dd.mm.gg
script is execute like this:
bin/script1.sh 14.12.2009
script1.sh code:
#!/bin/sh
input_date=$1
CMD="/app/si/test/test.sh $input_date"
echo "*****"
$CMD (2 Replies)
Discussion started by: waso
2 Replies
7. 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
8. Shell Programming and Scripting
The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies
9. 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
10. Shell Programming and Scripting
Here is my sample data
Test.txt
column 1|columne 2|start Date|end Date
test|test|03/24/2014|03/24/2014
test|test|03/24-2014|03/24/2014
test|test|03/24/2014|03/24/2014
test|test|03/24/2014|03/24-2014
test|test|03/24/2014|03/24/2014
Now in the file i am expecting the date fields should be... (4 Replies)
Discussion started by: krish2014
4 Replies