Unix
Unix
Unix
Hello!
You can save this file in your system to use it. This file can be used for practice.
Happy Learning!
Expected Output : 6
9.Count how many users are currently logged into the system
Expected Output :
Welcome to this course on Unix.
You can save this file in your system to use it. This file can be used for practice.
Expected Output : 3
Expected Output :
Hello!
You can save that file in your system to use it. This file can be used for practice.
Happy Learning!
13.Replace the word this by that only for the first occurrence of it in a line.
Expected Output :
Hello!
You can save that file in your system to use it. This file can be used for practice.
I have created that file to complete this assignment.
Happy Learning!
Expected Output :
Hello!
Expected Output :
You can save this file in your system to use it. This file can be used for practice.
Happy Learning!
awk Scripting :
17. Create a file with name student.txt with the following contents in it
RollNo|Name|Marks1|Marks2|Marks3
123|Raghu|80|90|60
342|Maya|45|78|82
561|Gita|56|71|89
480|Mohan|71|90|89
a. Write an awk command to print the name and roll number of the students.
Expected Output:
Name RollNo
Raghu 123
Maya 342
Gita 561
Mohan 480
b . Write the awk command to calculate the total marks of each student and display
the total marks along with the name of the student.
Expected Output:
Raghu-230
Maya-205
Gita-216
Mohan-250
Shell Scripting
18. Write a shell script to print the sum of the 1st 10 natural numbers.
Expected Output: 55
19. Write a shell script to print the odd numbers from a given list of numbers. The
list of numbers will be given as command line argument.
Example :
Expected Output :
45
20. Create a file studentScores.txt and append the following content to it.
RollNo|Name|Marks
123|Raghu|80
342|Maya|45
561|Gita|56
480|Mohan|71
write a shell script named scores.sh to find the name of the student who scored
highest marks. Incorporate validations for the following :
Expected Output :
1. https://www.tutorialspoint.com/unix_terminal_online.php
2. http://www.compileonline.com/execute_bash_online.php
3. https://bellard.org/jslinux/vm.html?url=https://bellard.org/jslinux/buildroot-
x86.cfg