Interview Questions  

Go Back   Interview Questions > Interview Questions & Answers > Information Technology > Scripting > Shell Script

Shell Script Shell Script Interview Questions, Learn by sharing Shell Script Interview Questions asked in various companies, Get Career advices, Interview Procedures from Shell Script experts, Post asked Shell Script Interview Questions and Answers.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2008, 11:30 AM
Senior Member
 
Join Date: Feb 2008
Posts: 687
Default How would you replace the n character in

How would you replace the n character in a file with some xyz?
Reply With Quote
  #2 (permalink)  
Old 06-28-2008, 04:26 AM
Junior Member
 
Join Date: Jun 2008
Location: Bangalore
Posts: 10
Default

n char in a file can be replaced using sed command as follows

sed s/n/abc/g filename > filename -> to replace all n chars with abc in file filename

sed s/n/abc/g filename -> just to view the changes
Reply With Quote
Reply

Tags
scripting, shell script, software

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On