Re: Bash script question.



Philippe Doucet wrote:
> I have a file that contains a single word. I"m trying to find a
> command that will put a white space between each letters of the word.

try:
cat filename | sed -e "s/./ &/g

this also puts a whitespace in front of the word. You can remove that by
doing
cat filename | sed -e "s/./ &/g | sed -e "s/^ //"

but I'm sure there are more elegant ways for doing the latter.

BTW I don't see anything gnome-specific about this problem :)
--
Reinhard Müller
BYTEWISE Software GmbH
A-6890 Lustenau, Enga 2
http://www.bytewise.at




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]