Computing.Net > Forums > Unix > Ksh script - add blank space

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Ksh script - add blank space

Reply to Message Icon

Name: apple
Date: June 8, 2005 at 07:28:05 Pacific
OS: ??
CPU/Ram: ??
Comment:

Dear All,
Would anyone help me the following problem I have?

string="Today is good/day"
output="Today is good day"

change string "/" to " "
I try :
echo "$string" | sed -e 's/\^/*//g'
show: Today is goodday.
It is not work, how can I add space between "good" "day"? please help.
Thank you




Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: June 8, 2005 at 10:24:17 Pacific
Reply:

You need to escape / and replace it with a space:

echo "$string" | sed -e 's/\// /g'



0
Reply to Message Icon

Related Posts

See More


Create an extended file f... Need help with sorting a ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Ksh script - add blank space

ksh script www.computing.net/answers/unix/ksh-script/6748.html

grep variable with blank space www.computing.net/answers/unix/grep-variable-with-blank-space/5469.html

Need Help With KSH Script www.computing.net/answers/unix/need-help-with-ksh-script/6747.html