In a file , how to retrieve the lines which are the
multiples of 50 ? like 50,100,150th lines etc.
Answer Posted / abhishek
awk 'NR % 2 == 0 {print}' abc.txt
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.
What does the sh command do?
How do I open the shell prompt?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What is bash used for?
What is basename in shell script?
What is the use of echo in shell script?
is this growing field and what is average package in this?
How do we delete all blank lines in a file?
What is the syntax of while loop in shell scripting?
How will you emulate wc –l using awk?
Determine the output of the following command: [ -z “” ] && echo 0 || echo 1
What does path stand for?
How to pass an argument to a script?
How to calculate the number of passed arguments?