![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I'm wondering if you can do the following with sed or some other way. I would like to chang the character "*" in a string to "\052" inside of a script?
i.e. string="text * text" #chang to string="text \052 text" |
|
||||
|
bash
Code:
#set -o noglob #string="text * text" # echo $string text * text # IFS="*" # set -- $string # echo $1 text # echo $2 text # echo $1\\052$2 text \052 text |
| Sponsored Links | ||
|
|