LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2014, 01:09 PM   #1
hayko27
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
bash friday the 13th script


Hi,

I need to construct a bash script that will accept one parameter(any year between 1900 and 2100)which will then print the months of the calendar that have a Friday the 13th. For example if I run

friday13 2015

it would print February

or friday13 2099

it would print September, October, December

*this is not exact^, I'm just giving an example.

Help is much appreciated as soon as possible.
Thank you in advance.
 
Old 07-31-2014, 01:10 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,102

Rep: Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515
Thats nice. What do you have so far?

You must be in the same class as these two people: http://www.linuxquestions.org/questi...ar-4175503292/

Warning though,.. not figuring this out on your own, according to what you have been taught, is going to make it harder and harder as the class goes on.

Last edited by szboardstretcher; 07-31-2014 at 01:12 PM.
 
Old 07-31-2014, 01:46 PM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,663
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Quote:
Originally Posted by szboardstretcher View Post
Thats nice. What do you have so far?

You must be in the same class as these two people: http://www.linuxquestions.org/questi...ar-4175503292/
Lol.
https://www.linuxquestions.org/quest...pt-4175511090/
https://www.linuxquestions.org/quest...pt-4175512870/

and 33 other hits at https://www.google.com/#q=bash-frida...xquestions.org
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script to count the number of occurences of friday the 13th in a given year michaelgg13 Linux - Newbie 33 07-31-2014 01:39 PM
[SOLVED] Friday the 13th bash script Linux hatesme Linux - Newbie 12 07-30-2014 11:39 PM


All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration