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
I want to connect to a remote server and execute some commands, how can I achieve this?
State the advantages of shell scripting?
What is k shell?
How can you find out how long the system has been running?
What does $1 mean in bash?
What is shell application?
What is a boot block?
What are filters explain sort with all the options available?
What is a shell made of?
What is the use of a shebang line?
write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.
What is mac default shell?
How to print the first array element?
I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?
What are the types of script?