What is use of CAL command in Linux?

What is use of CAL command in Linux?

cal command is a calendar command in Linux which is used to see the calendar of a specific month or a whole year. The rectangular bracket means it is optional, so if used without an option, it will display a calendar of the current month and year.

How do I run a .sh command?

How do I run . sh file shell script in Linux?

  1. Open the Terminal application on Linux or Unix.
  2. Create a new script file with .sh extension using a text editor.
  3. Write the script file using nano script-name-here.sh.
  4. Set execute permission on your script using chmod command : chmod +x script-name-here.sh.
  5. To run your script :

How do I write a shell script in Windows 10?

Here’s how.

  1. Navigate to Settings.
  2. Click Update & security.
  3. Select For Developers in the left column.
  4. Select Developer Mode under “Use developer features” if it’s not already enabled.
  5. Navigate to the Control Panel (the old Windows control panel).
  6. Select Programs and Features.
  7. Click “Turn Windows features on or off.”

What are the commands in the shell script?

Basic Shell Scripting Commands The basic shell scripting commands are: Echo command: The echo command is used for printing. Using a variable: A variable is used to store in some value so that the whole value does not need to be repeated and instead variables can be used.

How to create and run bash shell script?

Now inside this ‘scripts directory’, create a new file named hello.sh using the cat command: Insert the following line in it by typing it in the terminal: echo ‘Hello, World!’ Press Ctrl+D to save the text to the file and come out of the cat command.

How to use the CAL command in Linux?

1 cal : Shows current month calendar on the terminal. 2 cal 08 2000 : Shows calendar of selected month and year. 3 cal 2018 : Shows the whole calendar of the year. 4 cal 2018 | more : But year may not be visible in the same screen use more with cal use spacebar to scroll down. 5 cal -3 : Shows calendar of previous, current and next month

What is the first line of a shell script?

The first line of this program, #!/bin/sh, is called a shebang. This tells the BASH shell to execute the commands in the script. Every shell script you create will need this on the first line of the script.