Computer Science - Unix - Discussion

Discussion :: Unix - Section 1 (Q.No.7)

7. 

Which of the following keys is used to replace a single character with new text?

[A]. S
[B]. s
[C]. r
[D]. C
[E]. None of the above

Answer: Option B

Explanation:

No answer description available for this question.

Reena said: (Aug 16, 2011)  
Please explain this.

Sumit said: (Oct 10, 2011)  
Please explain this?

Shweta said: (Jan 14, 2012)  
Can't understand the question please clarify.

Ganesh said: (Jan 16, 2012)  
Can't understand just by switch. Please write the command.

Bishu Moharana said: (May 15, 2012)  
This is a question about VI Editor.
So when you want to replace single character with multiple character at that time we use 's'.
So when you want to replace single line with another line at that time we use 'S'

A.Anandaraman said: (Apr 11, 2013)  
sed -i 's/ugly/beautiful/g' text.txt

text.txt is the input file.

Here s is used to replace the characters.

Naresh said: (Nov 28, 2013)  
I want to know about UNIX clearly. So, Where should I get the complete information? any one please tell me.

Hiren said: (Dec 25, 2013)  
Search google like beginner unix you will get good result to learn.

Manish Agrawal said: (Apr 17, 2015)  
It is referring inline command (i.e start with esc and colon).

Ex1: s/+/ /g.

This command replace all plus (+) sign present in the file with space.

Ex2: s/I/You/g.

This command replace all "I" present in the file with "You".

Swapnil said: (Jul 22, 2016)  
It should be 'r'. After replacing with single character vi returns to command mode, so 'r' is more accurate than s.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.