0% found this document useful (0 votes)
27 views21 pages

Unix, Scripting, Vim & TCL Basics Guide

The test contains multiple choice and short answer questions about Unix concepts like the kernel and shell, environment variables, Unix commands, debugging errors, shell scripting, Vim editing and commands, using text processing tools within Vim,

Uploaded by

Reshma Seera
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views21 pages

Unix, Scripting, Vim & TCL Basics Guide

The test contains multiple choice and short answer questions about Unix concepts like the kernel and shell, environment variables, Unix commands, debugging errors, shell scripting, Vim editing and commands, using text processing tools within Vim,

Uploaded by

Reshma Seera
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Unix, Scripting, Vim &TCL

Basics
Instructions: Please type the answer in the column on the right , next to the question
After finishing the test, please send your answer sheets from your
Tech M mail ID. Name the file name:
YourName_BatchCode_UnixTestAnswers.docx
We want base data first. First version should be answered without Web Search.
.
1
a) Explain the terms Kernel and
Shell in Unix (1)
b) Explain the term Prompt (1)
c) What are different types of Unix
shells? (1)
2
a) Describe the login flow in unix,
with the help of the flow diagram
(1)
b) Explain the purpose of .<shell rc>
and .profile files in home
directory (1)
3
a) What are environment variables? How
is it set, modified and unset? (1)
b) What is the command to list the
environment variables and their
values? (1)
c) What is the command to display the
value of a specific environment
variable? (1)
d) What is the special meaning of
environment variables PATH,
DISPLAY and LD_LIBRARY_PATH?
(1)
4
a) If you get an error message
“Command not found.”, how
do you debug this error? (2)
5
List 20 Unix commands you know
with a short note on them (10)
6
a) Explain the function below b)
combination keys in Unix (5)
i. CTRL + C
ii. CTRL + Z
iii. CTRL + A
iv. CTRL + E
v. CTRL + S
vi. CTRL + Q
vii. CTRL + L
viii. CTRL + U
ix. ESC + P
x. ESC + N
Unix Shell Scripting
7
a) Write a unix shell script to
rename all the files in a
directory to add a suffix
.orig (2)
b) Write a unix shell script to
move all the files in a directory
which contains pattern
“Error:” into a subdirectory
fail/ (2)
Vim
8
a) Write 20 vim edit commands with
a short note (10)
b) Write 10 vim cursor movement
commands with a short note (5)
c) Write 10 :set <parameters>
in vim with a short note (5)
d) What are the commands for
forward and backward search? (1)
9
a) Write the vim command to change
case of text between line number 10
and line number 20 (both inclusive)
into UPPER CASE (2)
b) Write the vim command to delete from
the current line till the end of the file
(2)
c) Write the vim command to delete all
lines containing a pattern starting with
“Error:” and ending with “ModuleX”
from a file (2)
10
a) Explain how to use text
processing Unix commands like
“awk” or “sort” within a vim
session
i. On the entire file (1)
ii. On part of the file (2)
b) How to execute Unix commands
while being in a vim session (1)
11
a) Explain the usage of named
buffers (using “) in vim for
copying and pasting (2)
b) Explain the usage of numbered
buffers (such as \1, \2, etc.) for
search and substitute commands
(4)
TCL
12
a) Write examples of scalar, list and
array variables (3)
b) Write 5 list commands with a
short note (2)
c) Write 5 array commands with a
short note (4)
13
a) What are the commands for file
handling? (2)
b) What is the difference between
foreach and
foreach_in_collection? (2)
14
a) Write a TCL script to parse
through an input file and extract a
block starting with
“Startpoint:” and ending with
a line containing “VIOLATED” into
an output file (5)

You might also like