Unix/Linux Go Back    



Need help creating shell script with output that has 2014 calendar and 2 text items from a"fortune"

Homework & Coursework Questions




Kindly Note - This is a Single User Post by Forum Member dandanhelpmeman Regarding:
Need help creating shell script with output that has 2014 calendar and 2 text items from a"fortune".
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 07-01-2013
dandanhelpmeman dandanhelpmeman is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 30 July 2013, 3:08 PM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Code Need help creating shell script with output that has 2014 calendar and 2 text items from a"fortune"

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

I am required to create a bash shell script with either emacs or vi. It must include the year 2014 calendar on the left side and two text items on the right side.

2. Relevant commands, code, scripts, algorithms:

the two text items are from what my professor describes as a "fortune server". I have two commands to query them. nc langley.cs.fsu.edu 19000 and " " 19001. I am also instructed that the 2014 calendar must be computed and not a fixed value of 2014. I am told to use d=`date '+%Y'` to get the current year, then told to use the Bash syntax $((++d)). I am then recommended to use pr to paste the output together with pr -t -T -m -w 140 file1 file2.


3. The attempts at a solution (include all code and scripts):
It seems to take the d=`date '+%Y'` but then when i go to Bash and type $((++d)) it says 2014:command not found.
I also don't understand how to paste the two text items into individual files in order to put them together in a single script



4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

FSU,Tallahassee, FL, USA, Langley, COP3353

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).