How would you replace the n character in a file with some
xyz?
Answer Posted / seshadri sethi
sed ’s/n/xyz/g’ filename > new_filename
We can replace n characters by using the following command:
1,$s/./xyz/g
where 1 shows that the search string will start searching
patterns from first line of the file.
‘.’ for any character.
g for global replacemet.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the significance of the shebang line in shell scripting?
How to print pid of the current shell?
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.
Tell something about the super block in shell scripting?
How does shell scripting work?
Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?
What is path variable bash?
How will you pass and access arguments to a script in linux?
How do I run a bin bash script?
How will you emulate wc –l using awk?
What are the zombie processes?
Explain about the slow execution speed of shells?
Is shell scripting a language?
What is eval in shell script?
Why is a script important?