JNTUH B.Tech 4th year (4-1) Linux Programming Lab gives you detail information of Linux Programming Lab R13 syllabus It will be help full to understand you complete curriculum of the year.
Objectives
- To write shell scripts to solve problems.
- To implement some standard Linux utilities such as Is,cp etc using system calls.
- To develop network-based applications using C.
List of sample problems
Note: Use Bash for Shell scripts.
- Write a shell script that accepts a file name, starting and ending line numbers as arguments and displays all the lines between the given line numbers.
- Write a shell script that deletes all lines containing a specified word in one or more files supplied as arguments to it.
- Write a shell script that displays a list of all the files in the current directory to which the user has read, write and execute permissions.
- Write a shell script that receives any number of file names as arguments checks if every argument supplied is a file or a directory and reports accordingly. Whenever the argument is a file, the number of lines on it is also reported.
- Write a shell script that accepts a list of file names as its arguments, counts and reports the occurrence of each word that is present in the first argument file on other argument files.
- Write a shell script to list all of the directory files in a directory.
- Write a shell script to find factorial of a given integer.
- Write an awk script to count the number of lines in a file that do not Contain vowels.
- Write an awk script to find the number of characters, words and lines in a file.
- Write a C program that makes a copy of a file using standard I/O and system calls.
- Implement in C the following Linux commands using System calls
a). cat b) my - Write a C program to list files in a directory.
- Write a C program to emulate the Unix Is —I command.
- Write a C program to list for every file in a directory, its mode number and file name.
- Write a C program that redirects standard output to a file.Ex: Is > f 1.
- Write a C program to create a child process and allow the parent to display “parent” and the child to display “child” on the screen.
- Write a C program to create a Zombie process.
- Write a C program that illustrates how an orphan is created.
- Write a C program that illustrates how to execute two commands concurrently with a command pipe. Ex:- Is —l I sort
- Write C programs that illustrate communication between two unrelated processes using named pipe(FIFO FUe).
- Write a C program in which a parent writes a message to a pipe and the child reads the message.
- Write a C program (sender.c) to create a message queue with read and write permissions to write 3 messages to it with different priority numbers.
- Write a C program (receiver.c) that receives the messages (from the above message queue as specified in (22)) and displays them.
- Write a C program that illustrates suspending and resuming processes using signals.
- Write Client and Server programs in C for connection oriented communication between Server and Client processes using Unix Domain sockets to perform the following: Client process sends a message to the Server Process.The Server receives the message,reverse S it and sends it back to the Client.The Client will then display the message to the standard output device.
- Write Client and Server programs in C for connection oriented communication between Server and Client processes using Internet Domain sockets to perform the following: Client process sends a message to the Server Process.The Server receives the message,reverse S it and sends it back to the Client.The Client will then display the message to the standard output device.
- Write C programs to perform the following: One process creates a shared memory segment and writes a message(”HelIo”) into it.Another process opens the shared memory segment and reads the message. “HelIo”).lt will then display the message(”HelIo”) to standard output device.
TEXT BOOKS
- Beginning Linux Programming, 4 Edition, N.Matthew, R.Stones,Wrox, Wiley India Edition.
- Advanced Unix Programming, N.B.VenkateswarUlU, BS Publications.
- Unix and Shell Programming, M.G. Venkatesh Murthy, Pearson Education.
- Unix Shells by Example, 4th Edition, ElIlie Quigley, Pearson Education.
- Sed and Awk, O.Dougherty&A.RObbiflS,2’ edition, SPD.
Outcomes
- Ability to understand the Linux environment.
- Ability to perform the file management and multiple tasks using shell scripts in Linux environment.
For more information about all JNTU updates please stay connected to us on FB and don’t hesitate to ask any questions in the comment.