0

I have a problem with UNIX script.

original_string='AGENT                               UNKNOWN'
replacement=`echo $original_string | sed 's/UNKNOWN/ACTIVE/g'`
echo $replacement

The result of this script gives me :

AGENT ACTIVE

But I want to maintain all the spaces between the characters like:

AGENT                               ACTIVE

Someone please help.

Bhabani Shankar
  • 1,267
  • 4
  • 22
  • 41

0 Answers0