You are on page 1of 2

Last login: Wed Feb 15 11:22:16 on ttys000

VIT-CC3-11:~ student$ mkdir Aaditi


VIT-CC3-11:~ student$ cd Aaditi
VIT-CC3-11:Aaditi student$ cat>abc.txt
Uttar Pardesh
Andhra Pradesh
Maharashtra
Gujarat
Rajasthan
^Z
[1]+ Stopped cat > abc.txt
VIT-CC3-11:Aaditi student$ cat>xyz.txt
Arunchal Pradesh
Goa
Uttar Pradesh
Maharashtra
Assam
^Z
[2]+ Stopped cat > xyz.txt
VIT-CC3-11:Aaditi student$ sort abc.txt>def.txt
VIT-CC3-11:Aaditi student$ sort xyz.txt>pqr.txt
VIT-CC3-11:Aaditi student$ diff abc.txt xyz.txt
1,2c1,3
< Uttar Pardesh
< Andhra Pradesh
---
> Arunchal Pradesh
> Goa
> Uttar Pradesh
4,5c5
< Gujarat
< Rajasthan
---
> Assam
VIT-CC3-11:Aaditi student$ comm def.txt pqr.txt
Andhra Pradesh
Arunchal Pradesh
Assam
Goa
Gujarat
Maharashtra
Rajasthan
Uttar Pardesh
Uttar Pradesh
VIT-CC3-11:Aaditi student$ comm -1 def.txt pqr.txt
Arunchal Pradesh
Assam
Goa
Maharashtra
Uttar Pradesh
VIT-CC3-11:Aaditi student$ comm -2 def.txt pqr.txt
Andhra Pradesh
Gujarat
Maharashtra
Rajasthan
Uttar Pardesh
VIT-CC3-11:Aaditi student$ comm -3 def.txt pqr.txt
Andhra Pradesh
Arunchal Pradesh
Assam
Goa
Gujarat
Rajasthan
Uttar Pardesh
Uttar Pradesh
VIT-CC3-11:Aaditi student$ split abc.txt
VIT-CC3-11:Aaditi student$ ls
abc.txt def.txt pqr.txt xaa xyz.txt
VIT-CC3-11:Aaditi student$ cat xaa
Uttar Pardesh
Andhra Pradesh
Maharashtra
Gujarat
Rajasthan
VIT-CC3-11:Aaditi student$ tar cvf Aadi.tar *.txt
a abc.txt
a def.txt
a pqr.txt
a xyz.txt
VIT-CC3-11:Aaditi student$ tar cvf Aadi.tar * abc.txt pqr.txt
a Aadi.tar: Can't add archive to itself
a abc.txt
a def.txt
a pqr.txt
a xaa
a xyz.txt
a abc.txt
a pqr.txt
VIT-CC3-11:Aaditi student$ tar cvf Aadi1.tar * abc.txt pqr.txt
a Aadi.tar
a abc.txt
a def.txt
a pqr.txt
a xaa
a xyz.txt
a abc.txt
a pqr.txt
VIT-CC3-11:Aaditi student$ ls
Aadi.tar Aadi1.tar abc.txt def.txt pqr.txt xaa xyz.txt
VIT-CC3-11:Aaditi student$ cd ..
VIT-CC3-11:~ student$ mkdir OS
mkdir: OS: File exists
VIT-CC3-11:~ student$ mkdir os
mkdir: os: File exists
VIT-CC3-11:~ student$ mkdir oslab
VIT-CC3-11:~ student$ cd Aaditi
VIT-CC3-11:Aaditi student$ mkdir OS
VIT-CC3-11:Aaditi student$ cp Aadi.tar OS
VIT-CC3-11:Aaditi student$ cd OS
VIT-CC3-11:OS student$ ls
Aadi.tar
VIT-CC3-11:OS student$ tar xvf Aadi.tar
x abc.txt
x def.txt
x pqr.txt
x xaa
x xyz.txt
x abc.txt
x pqr.txt
VIT-CC3-11:OS student$ ls
Aadi.tar abc.txt def.txt pqr.txt xaa xyz.txt
VIT-CC3-11:OS student$ cd ..
VIT-CC3-11:Aaditi student$ cat>math.sh
sum= $((10+20))
echo"Sum= $sum"
^Z
[3]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ ./math.sh
-bash: ./math.sh: Permission denied
VIT-CC3-11:Aaditi student$ ls -l
total 104
-rw-r--r-- 1 student staff 8192 Feb 15 11:46 Aadi.tar
-rw-r--r-- 1 student staff 16896 Feb 15 11:47 Aadi1.tar
drwxr-xr-x 8 student staff 272 Feb 15 11:53 OS
-rw-r--r-- 1 student staff 59 Feb 15 11:31 abc.txt
-rw-r--r-- 1 student staff 59 Feb 15 11:32 def.txt
-rw-r--r-- 1 student staff 32 Feb 15 12:02 math.sh
-rw-r--r-- 1 student staff 53 Feb 15 11:32 pqr.txt
-rw-r--r-- 1 student staff 59 Feb 15 11:43 xaa
-rw-r--r-- 1 student staff 53 Feb 15 11:32 xyz.txt
VIT-CC3-11:Aaditi student$ chmod 777 math.sh
VIT-CC3-11:Aaditi student$ ./math.sh
./math.sh: line 1: 30: command not found
./math.sh: line 2: echoSum= : command not found
VIT-CC3-11:Aaditi student$ cat>math.sh
sum=$((10+20))
echo "Sum= $sum"
^Z
[4]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ ./math.sh
Sum= 30
VIT-CC3-11:Aaditi student$ cat>math.sh
a=10
b=20
sum=$((a+b))
echo "Sum= $sum"
^Z
[5]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ ./math.sh
Sum= 30
VIT-CC3-11:Aaditi student$ cat>math.sh
read a
^Z
[6]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ cat>math.sh
read -p "Enter 1st no.: " a
read -p "Enter 2nd no.: " b
sum=$((a+b))
echo "Sum+ $sum"
^[[A^[[A^[[A^Z
[7]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ cat>math.sh
read -p "Enter 1st no.: " a
read -p "Enter 2nd no.: " b

sum=$((a+b))
echo "Sum+ $sum"

dif=$((a-b))
echo "Diff^Z
[8]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ cat>math.sh
read -p "Enter 1st no.: " a
read -p "Enter 2nd no.: " b
sum=$((a+b))
echo "Sum= $sum"
dif=$((a-b))
echo "Diff= $dif"
mul+$((a*b))
vi math.sh
i
^Z
[9]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ vi math.sh
VIT-CC3-11:Aaditi student$ ./math.sh
Enter 1st no.: 40
Enter 2nd no.: 4
Sum= 44
Diff= 36
Mult= 160
Div= 10
VIT-CC3-11:Aaditi student$ cat>SI.sh
^Z
[10]+ Stopped cat > SI.sh
VIT-CC3-11:Aaditi student$ vi SI.sh
VIT-CC3-11:Aaditi student$ chmod 777 SI.sh
VIT-CC3-11:Aaditi student$ ./SI.sh
Enter Principle amount: 100000
Enter No. of year: 5
Enter Rate of intrest: 12.5
./SI.sh: line 4: (100000*5*12.5)/100: syntax error: invalid arithmetic operator (error token is ".5)/100")
Simple Intrest:
VIT-CC3-11:Aaditi student$ ./SI.sh
Enter Principle amount: 100000
Enter No. of year: 5
Enter Rate of intrest: 12
Simple Intrest: 60000
VIT-CC3-11:Aaditi student$

You might also like