summaryrefslogtreecommitdiff
path: root/klavaro/L80.txt
blob: c982a4ca7c513ec559a8cadd9e1eb50a922f7d1e (plain)
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
32
33
34
35
36
Shell Test
$ vi ginfo
#
#
# Script to print user information who currently login, current date & time
#
clear
echo "Hello $USER"
echo "Today is \c ";date
echo "Number of user login: \c" ; who | wc -l
echo "Calendar"
cal
exit 0
$ vi demo
#!/bin/sh
#
# Script that demos, command line args
#
echo "Total number of command line argument are $#"
echo "$0 is script name"
echo "$1 is first argument"
echo "$2 is second argument"
echo "All of them are:- $* or $@"
# vi /etc/bashrc
# At the end of file add following in /etc/bashrc file
#
# today() to print formatted date
#
# To run this function type today at the $ prompt
# Added by Vivek to show function in Linux
#
today()
{
echo This is a `date +"%A %d in %B of %Y (%r)"`
return
}