Linux shell programing validating date

Rated 4.22/5 based on 961 customer reviews

I have a query anyone help would be much appreciated I am using sun solaris OS I want to validate a file according to its date and if validate successful then it would write the file name,size,date and...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... I want to validate date pattern using Regex expression here is the sample program i have written. /bin/sh check Date="2010-04-09" regex="\d-\d-\d$" echo $regex if ] then echo "OK" else echo "not OK" fi But the ouput is...I also want to check to make sure its a valid day based on the month (ie 30days has sept, april, june and Nov..)... 1988 I need to change that to (1988)]] The date range goes back to 1400 so I guess I need to do the following ssh into my server, dump mysql database vi dump search...Pardon my ignorance but I am lost on how to do this I have a file called "Sample.txt", it is pipe delimited, it should have 13 fields.But some of the records do not, I would like to set up a shell script where I can pass in a parameter "Sample.txt" and it would split the file into records...

||

I have a query anyone help would be much appreciated I am using sun solaris OS I want to validate a file according to its date and if validate successful then it would write the file name,size,date and...

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... I want to validate date pattern using Regex expression here is the sample program i have written. /bin/sh check Date="2010-04-09" regex="\\d-\\d-\\d\$" echo $regex if ] then echo "OK" else echo "not OK" fi But the ouput is...

]]

linux shell programing validating date-59

linux shell programing validating date-54

Visit Stack Exchange This method treats input as a string then parses and tests it for proper formatting.I have the script that splits the date into year,month and date. The input should be of 8 digits with only numeric values.I tried the following echo

Visit Stack Exchange This method treats input as a string then parses and tests it for proper formatting.

I have the script that splits the date into year,month and date. The input should be of 8 digits with only numeric values.

I tried the following echo $1 | grep '^\$/p' if then echo "Valid" else echo "invalid" I get the error, grep: RE error 16: Bad number.

I have one shell script which is taking date as input in YYYYMMDD format.

I need to put a validation for the user input, so that it should accept only greater than one week's after date (eg.

||

Visit Stack Exchange This method treats input as a string then parses and tests it for proper formatting.I have the script that splits the date into year,month and date. The input should be of 8 digits with only numeric values.I tried the following echo $1 | grep '^\$/p' if then echo "Valid" else echo "invalid" I get the error, grep: RE error 16: Bad number. I have one shell script which is taking date as input in YYYYMMDD format.I need to put a validation for the user input, so that it should accept only greater than one week's after date (eg.

| grep '^$/p' if then echo "Valid" else echo "invalid" I get the error, grep: RE error 16: Bad number. I have one shell script which is taking date as input in YYYYMMDD format.I need to put a validation for the user input, so that it should accept only greater than one week's after date (eg.

Leave a Reply