The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 06-30-2009
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,312
Quote:
Originally Posted by ora_umair View Post
Hi, All -

I have a script where I need to change the server name from "dallinux01" to "DALLINUX01" in multiple places.

Can some one tell me a command that I can use for this? I played with the tr (translate) command but tr works byte by byte. Meaning that when I use the tr command all "d"s are converted to "D"s throughout the file instead of just "DALLINUX01".

Thanks!
Why don't you use sed?

Code:
sed 's/dallinux01/DALLINUX01/g' file
Regards