Korn Shell Example: Show Dates #Linux/Unix: Shell Programming – 001

bash-3.2$ cat echoscript2.ksh
#!/bin/ksh
#clear
print “SCRIPT BEGINS”
print “Hello $LOGNAME”
print
print -n “Todays date is: ”
date ‘+%m/%d/%y’
print -n “and the current time is: ”
date ‘+%H:%M:%S%n’
print “Now a list of the processes in the current
shell”
ps
print “SCRIPT FINISHED!!”

bash-3.2$ ./echoscript2.ksh
SCRIPT BEGINS
Hello shell

Todays date is: 04/27/18
and the current time is: 08:05:20

Now a list of the processes in the current
shell
PID TTY TIME CMD
18641 syscon 0:00 ps
18585 syscon 0:00 sh
18638 syscon 0:00 echoscri
18589 syscon 0:00 bash
SCRIPT FINISHED!!

From: http://sitestree.com/?p=12210
Categories:Linux/Unix: Shell Programming – 001
Tags:
Post Data:2018-04-28 23:08:39

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada