NAA Lab Version1
NAA Lab Version1
(section NAA)
i. Use grep to print all books information where author is "Jane Austen".
ii. Use sed to extract all lines containing IP addresses (string of the form
10.10.10.211) from the text file and delete it
iii. Use sed to delete all lines containing the word "Mockingbird".
iv. Use awk to print the first and third columns of the text file, separated by a
space.
Perform the following instructions using gdb:
1. Set Breakpoint at line4
2. Run the Program
3. Print Variable Values of variables: num1, num2 and result
5. List the source code around the current execution point
6. Set Breakpoint at line 6
7. Continue Execution until the next breakpoint
8. print variable value of result
9. Exit the program, fix the bug for variable num2, compile and rerun the code.
(Take snapshots of all steps).
Write a shell script to display following menu of commands to the user, take
user input and perform the user specified task from the menu:
1. Printing cars with their prices (define cars as an array)
2. Print the hostname
3. Display long listing of current directory in reverse order
Based on user input the script performs the command and exits. (Use case
construct)