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 first line of a shell script called?
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.
How will you print the login names of all users on a system?
Why are there shells on the beach?
What is the difference between scripting and coding?
Why is used in shell scripting?
What command needs to be used to take the backup?
What is another name for a bash shell script that you might see?
What does sh mean?
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 is the difference between grep and egrep?
Please give me example of " at command , contrab command " how to use
What is the best shell scripting language?
Explain about gui scripting?
How many fields are present in a crontab file and what does each field specify?