Write a shell script that displays the calendar for present month, current working directory, and the files with the extension sash
Write a shell script that displays the calendar for present month, current working directory, and the files with the extension sash
Code:
#! /bin/sash -f
#Hints-1
#Open gedit and type the following program and Save with extension .sash and run $ sh programname.sash
#or
#Hints-2
# echo " " >> programname.sash ,type this line in last below a program and run sh programname and see the directory
#programname.sash file was created.
clear
echo The calendar for present month
cal
echo Current working directory
pwd
Output:
The calendar for present month
December 2013
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Current working directory
/home/elcot
Current working directory
/home/elcot
Leave a Comment