How will I insert a line "abcdef" at every 100th line of a file?

Answers were Sorted based on User's Feedback



How will I insert a line "abcdef" at every 100th line of a file?..

Answer / aayan

sed '1~100iabcdef' filename.txt

Is This Answer Correct ?    16 Yes 2 No

How will I insert a line "abcdef" at every 100th line of a file?..

Answer / pix

sed '100iABCDEF' file1

Is This Answer Correct ?    9 Yes 3 No

Post New Answer

More Shell Script Interview Questions

What is shell geeksforgeeks?

0 Answers  


What language is used in terminal?

0 Answers  


1.Write a script, which converts a number from binary to hexadecimal format or vice versa.

1 Answers   ADP,


Which shell is the best?

0 Answers  


Write a shell script in Linux to shift all characters in a file forward by five characters. (Thus “a” becomes “f’”).

2 Answers   Ignou, Tripura Info,






What can you do with powershell?

0 Answers  


What are environment variables?

2 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.

0 Answers   Cap Gemini, Wipro,


What does chmod do?

0 Answers  


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

0 Answers  


How does ls command work?

0 Answers  


Write a shell program to test whether a given number is even or odd?

8 Answers  


Categories