04-21-2011
Quote:
Originally Posted by
casmo
thanks for your reply pludi
This is the requirement I got from my management to validate the expiry date. Please help me
We would ask you again to show your
own effort in resolving your
own issue/task. We can only help you to help yourself....
Here's a starter pseudo-code:
- Get today date in the format: YYYYMMDD
- Convert the date in the last field of every line/record into the same YYYYMMDD format
- Subtract 2 from 1
- If the result of the subtraction is less than 4, tag the record/line for mailing
- Mail all the tagged records/line to a designated address.
Last edited by vgersh99; 04-21-2011 at 11:43 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to clean up my server and I have the list of some "special" users stored on the text file like this
Now I want to write a shell script to finger all of them so I can have some kind of ideas who they are but here comes the problem....I completely forgot how to do it with shell... (3 Replies)
Discussion started by: Micz
3 Replies
2. 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
3. Shell Programming and Scripting
Hello folks,
I have question about my expiry of shell script, today date is 2009-11-11, i will have to deploy a script today, how i should setup that my script will not work after 2010-05-11, Between if someone will change the date of server then script will again not work, please give... (3 Replies)
Discussion started by: learnbash
3 Replies
4. Shell Programming and Scripting
I am having one text file and i need to read that data from my shell script.
I will expain you the scenario:
Script look like:
For name type 1:
For age type 2:
For Salary type3:
echo "Enter the input:"
read the data
if input is 1 then go to the Text file and print the... (2 Replies)
Discussion started by: dineshmurs
2 Replies
5. Shell Programming and Scripting
I need shell 0r Perl script to read multiple input and do something and come out
example:
echo “ enter the host names separated by space “
read servers
foreach @servers
{ do
do something
done}
Here host names like host1 host2 host3 . . . . . . . so on
Please help me... (8 Replies)
Discussion started by: sreedhargouda
8 Replies
6. Shell Programming and Scripting
Hi All,
I am very new to unix and just started to work with unix and shell scripting.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... (3 Replies)
Discussion started by: sv0081493
3 Replies
7. Shell Programming and Scripting
Hi,
I need to get input arguments, as well as validate them. This is how I'm reading them:
#!/bin/bash
args="$@" # save arguments to variable
## Read input arguments, if so
while ; do
case $1 in
-v | --verbose ) verbose=true;;
-z | --gzip ) compression="gz";;
... (3 Replies)
Discussion started by: AlbertGM
3 Replies
8. UNIX for Dummies Questions & Answers
sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies
9. UNIX for Dummies Questions & Answers
Dear experts,
I am new to linux programming. I have a shell script which i should run it on all my samples.
I only define input and out put for this script. The inputs are 3 numbers(coordination numbers) which are available in a series of text file.
Since i have a lots of samples, it takes a... (5 Replies)
Discussion started by: mohamadreza
5 Replies
10. Shell Programming and Scripting
i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies