The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 08-09-2007
robotronic's Avatar
robotronic robotronic is offline Forum Advisor  
Can I play with madness?
  
 

Join Date: Apr 2002
Location: Italy
Posts: 370
Agreeing with your request, the {alphanumeric string with underscore} corresponds to "[0-9a-zA-Z_][0-9a-zA-Z_]*". So:


Code:
sed "s/ [0-9a-zA-Z_][0-9a-zA-Z_]*:/x/g" file1.txt

But I think this is better:


Code:
sed "s/ .*:/x/g" file1.txt

Bye