Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replace character with blank space 1

Status
Not open for further replies.

jestrada101

Technical User
Mar 28, 2003
332
How can I replace a single character with a blank space in its place using sed or awk? I can't seemt o find any documnenation anywhere?

THANKS
JE
 
If the character is say a [tt]D[/tt], you could do this...
Code:
    echo "ABCDEFG" | sed 's/D/ /g'
Hope this helps.

 
alternatively u can try "tr"
. say u have file with contentsl "a b" i.e a space b.
2 fill the space ith "1" try
Code:
tr &quot; &quot; &quot;1&quot; < file



[ponder]
----------------
ur feedback is a very welcome desire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top