Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Shell Script within the Unix/Linux forums, part of the Operating Systems category; how'ld u write a shell script that would check if a date entered in yyyy mm dd format is a saturday. i kno how to write it in mm dd ...
|
|||||||
|
|||
|
Shell Script
how'ld u write a shell script that would check if a date entered in yyyy mm dd format is a saturday. i kno how to write it in mm dd yy format
Last edited by henri084; 06-18-2007 at 12:07 PM. |
| Sponsored Links |
|
|||
|
Re: Shell Script
echo "Enter Date :"
read ate date --date=$ate > /tmp/date aday=`cut -c 1-3 /tmp/date` if [ $aday = 'Sat' ] ; then echo "Saturday at $ate " else echo "Not saturday at $ate as $aday" fi Regards, Shekhar |
| The Following User Says Thank You to uniqueshekhar For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell script | Barbie | Unix/Linux | 13 | 10-11-2008 12:32 PM |
| Shell Scripting questions | Geek_Guest | Unix/Linux | 4 | 11-05-2007 02:05 AM |
| Popular Shell in Linux | norman | Unix/Linux | 1 | 09-25-2007 08:25 AM |
| Desktop and Shell replacement | JobHelper | Geeks Lounge | 0 | 03-01-2007 09:40 AM |
| Difference in UNIX Shell | scott | Unix/Linux | 2 | 07-23-2006 12:40 PM |