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

What can you do with powershell?

699


What is the first line in a shell script?

642


How do I open the shell in cmd?

626


What is a shell environment?

650


What is console line?

661






What does $0 mean in shell script?

645


How can you get the value of pi till a 100 decimal places?

632


What is a shell script in windows?

656


How many fields are present in a crontab file and what does each field specify?

679


How can I set the default rwx permission to all users on every file which is created in the current shell?

1043


What is shell geeksforgeeks?

665


How do I run a shell script in powershell?

628


What can scripts do?

732


How do you create a shortcut in linux?

673


What is shell terminal?

627