I wish to create a bash shell script that meets the requirements below.
?Write a bash shell script called how_many_to_go that calculates and prints the number of days, hours, minutes and/or seconds until the end of the current month (based on the output of the date command).
o Do not make any assumptions about what month it is - the script should run properly in any month.
o Assume that it is not a leap year, so the number of days in any month is known (February has 28 days; April, June, September, and November have 30 days; All the rest have 31 days).
o The output should read "There are d days, h hours, m minutes, and s seconds until the end of the month" except as modified by the command line arguments below.
o The script should accept command line arguments as follows (assume that it's now 11:00:00 PM on January 30):
how_many_to_go - print the number of days, hours, minutes, and seconds until the end of the month (e.g. "There are 1 days, 1 hours, 0 minutes, and 0 seconds until the end of the month")
how_many_to_go h - print the number of hours, minutes, and seconds until the end of the month (e.g. "There are 25 hours, 0 minutes, and 0 seconds until the end of the month")
 how_many_to_go m - print the number of minutes and seconds until the end of the month (e.g. "There are 1500 minutes and 0 seconds until the end of the month")
 how_many_to_go s - print the number of seconds until the end of the month (e.g. "There are 90000 seconds until the end of the month.
Thanks
Related Tutorials/Questions & Answers:
LINUX SHELL SCRIPT - Date CalendarLINUX SHELL SCRIPT
I wish to create a bash
shell script that meets the requirements below.
?Write a bash
shell script called how_many_to_go... not make any assumptions about what month it is - the
script should run properly
Export to Shell Script Plugin
Export to
Shell Script Plugin
...
having to custom write the
shell script code
For more information click... of an eclipse
project's runtime configurations to
shell scripts in various formats
Advertisements
How do I read a variable from a file in shell script command.
How do I read a variable from a file in
shell script and then use...How do I read a variable from a file in
shell script Hi,
In my project we are submitting the job on spark cluster through sh file. Now I want
LinuxLinux hi all,
i want to invoke
shell program from java. i m using the following code.
package
script;
import java.io.IOException;
public class RunShell {
public static void main(String[] args) throws IOException
Sitemap Linux Tutorial |
How to
Shut down
Linux |
Shell
in
Linux. |
Shell Programming... | Site
Map | Business Software
Services India
Linux Tutorial Section
What is
Linux? |
Introducing
Linux OS |
Beginner Guide to
Linux Server
java server on linux ystemsjava server on
linux ystems hi.. i use
linux... i want to remotely login into another
linux system using java and then execute commands over...
for exmple in
shell we use "ssh username@ipaddress" to login to a host...how can i login
ModuleNotFoundError: No module named 'shell'ModuleNotFoundError: No module named '
shell' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
shell'
How to remove the ModuleNotFoundError: No module named '
shell'
ModuleNotFoundError: No module named 'to-shell'ModuleNotFoundError: No module named 'to-
shell' Hi,
My Python... 'to-
shell'
How to remove the ModuleNotFoundError: No module named 'to-
shell... to install padas library.
You can install to-
shell python with following
Linux Administrator
Linux Administrator
Position Vacant:
Linux Administrator
Job Description
We are looking for
Linux Administrator to manage
Linux and Unix servers
Linux installationLinux installation I want to install
linux for generally purpose functions,which
linux[fedora , ubunto,centos etc ]should i install.In my pc there is already windows,How much the
linux will effect my windows & data in C
Wicked ShellWicked
Shell
Wicked Shellis an Eclipse plugin providing direct access to your system's
shell. To be
honest, Wicked
Shell is not evil at all,
although it calls itself wicked...
Wicked
Shell is a small plugin trying to support your
LINUX - RegexLINUX I am running Radhat
LINUX in my system..
but in this gcc/cc/g++ command is not working .. so
i think C,C++ is not installed my system... to the
LINUX . I know for window..
but i want to connect
LINUX importing pyspark in python shell is that its not coming in the python
shell.
How should I do for importing pyspark in python
shell?
I am experience Python developer and now looking to use my
importing pyspark in python shell is that its not coming in the python
shell.
How should I do for importing pyspark in python
shell?
I am experience Python developer and now looking to use my
jdbc in linuxjdbc in linux what will be database url if i'm using mysql database on
linux platform ?
what will be driver name & class name to be used in "Class.forName()" method ?
plz give short source code
Java scriptJava script Source code for capturing the screen using Java
Script ModuleNotFoundError: No module named 'aws-shell'ModuleNotFoundError: No module named 'aws-
shell' Hi,
My Python... 'aws-
shell'
How to remove the ModuleNotFoundError: No module named 'aws-
shell' error?
Thanks
Hi,
In your python environment you
ModuleNotFoundError: No module named 'clik-shell'ModuleNotFoundError: No module named 'clik-
shell' Hi,
My Python... 'clik-
shell'
How to remove the ModuleNotFoundError: No module named 'clik-
shell' error?
Thanks
Hi,
In your python environment you
ModuleNotFoundError: No module named 'kore-shell'ModuleNotFoundError: No module named 'kore-
shell' Hi,
My Python... 'kore-
shell'
How to remove the ModuleNotFoundError: No module named 'kore-
shell' error?
Thanks
Hi,
In your python environment you
ModuleNotFoundError: No module named 'kube-shell'ModuleNotFoundError: No module named 'kube-
shell' Hi,
My Python... 'kube-
shell'
How to remove the ModuleNotFoundError: No module named 'kube-
shell' error?
Thanks
Hi,
In your python environment you
ModuleNotFoundError: No module named 'lg-shell'ModuleNotFoundError: No module named 'lg-
shell' Hi,
My Python...-
shell'
How to remove the ModuleNotFoundError: No module named 'lg-
shell... to install padas library.
You can install lg-
shell python with following
ModuleNotFoundError: No module named 'lg-shell'ModuleNotFoundError: No module named 'lg-
shell' Hi,
My Python...-
shell'
How to remove the ModuleNotFoundError: No module named 'lg-
shell... to install padas library.
You can install lg-
shell python with following
ModuleNotFoundError: No module named 'ma-shell'ModuleNotFoundError: No module named 'ma-
shell' Hi,
My Python...-
shell'
How to remove the ModuleNotFoundError: No module named 'ma-
shell... to install padas library.
You can install ma-
shell python with following
ModuleNotFoundError: No module named 'os-shell'ModuleNotFoundError: No module named 'os-
shell' Hi,
My Python...-
shell'
How to remove the ModuleNotFoundError: No module named 'os-
shell... to install padas library.
You can install os-
shell python with following