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 / suresh raju

sed 's/.\{1,75\}/xyz/g' filename

here n=75. so 75 characters will be replaced with xyz

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we write bin bash in shell scripts?

998


How do scripts work?

1028


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

972


What is wc in shell script?

964


How will you connect to a database server from linux?

1022


I want to connect to a remote server and execute some commands, how can I achieve this?

1012


Can we run shell script in windows?

1114


What is a shell made of?

940


How to open a read-only file in the shell?

1115


wats the deinitions for shell utility and filter?

2301


How do I run a script from command prompt?

1059


I have 2 files and I want to print the records which are common to both.

1148


How to get the first line from a file using just the terminal?

1100


How to write a function?

1017


How to get script name inside a script?

993