Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the significance of the shebang line in shell scripting?

1039


How to print pid of the current shell?

943


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.

2202


Tell something about the super block in shell scripting?

971


How does shell scripting work?

1049


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 ?

2087


What is path variable bash?

988


How will you pass and access arguments to a script in linux?

1067


How do I run a bin bash script?

967


How will you emulate wc –l using awk?

1459


What are the zombie processes?

913


Explain about the slow execution speed of shells?

1159


Is shell scripting a language?

972


What is eval in shell script?

1158


Why is a script important?

985