Professional Documents
Culture Documents
Linux Commands
Linux Commands
Section 1 :
1. Count the total number of words in file text1.
himanshu@ubuntu:~$ wc -w text1
11 text1
2. Display the system date in following format:
Today is Friday, 17 May 96
himanshu@ubuntu:~$ echo "Today is "`date +%A`" , "`date +%d` `date +%B` `date +%g`
Today is Tuesday , 09 October 12
3. Display the following text message on the monitor screen.
Deposited $100 to you account
himanshu@ubuntu:~$ echo -e "Deposited \$100 to you account"
4.
.
./.dbus
./.dbus/session-bus
./Templates
./play
./Downloads
./.compiz
./.compiz/session
./.gnome2
./.gnome2/file-roller
./.gnome2/keyrings
:
:
:
:
./.cache/software-center
./.cache/software-center/software-center-agent.db.tmp
./.cache/software-center/icons
./.cache/.fr-dotC8k
./.cache/.fr-dotC8k/Linux-lab-2012
266
6. Assign a value Black to var1 and then display the following message on the
terminal using this variable.
Black belt is associated with karate
himanshu@ubuntu:~$ var1=Black;echo "$var1 belt is associated with karate
"
Black belt is associated with karate