Unix

Bourne Shell in Unix Questions

Shellscript3 Question: Write a shell script to print numbers as 5 4 3 2 1 using while loop. Sample output: 5 4 3 21 Code: scriptprog3.sh ShellScript4 Question: Write a shell script to print the given number in reverse order.  Get input from user and display the result. In case of negative number is given…

Filters in Unix Question

Find string2 Question: Display the lines from the file teknoscript.txt  that  do not contain the string lin. Code: findstring2.sh Find string 3 Question: Display the lines from the file teknoscript.txt  that contain the string “lin” along with its line numbers.  Code: findstring3.sh Find string 5 Question: Display the lines from the file teknoscript.txt  that end…

File System of Unix

Directory Creation – 1 Question: Create the directory structure given in the image using mkdir for directory creation and touch for creating files. Note:assume that you are inside your home directory and always specify only relative path. Code: directory.sh Directory Creation – 2 Question: Create the directory structure given in the image using mkdir command for directory…

Introduction to Unix

Calendar 3 Question: Write a command to display the calendar for December of the year 2015. Code: calendar.sh Calendar 4 Question: What is the command to display the days of the year 2016  Example   Code: calendar2.sh Calendar 5 Question: Write a command to display the previous, current and next month calendar of the year 2015 December….

x