Re: Bash script question.
- From: Reinhard Müller <reinhard mueller bytewise at>
- To: Philippe Doucet <philippedoucet hotmail com>
- Cc: gnome-list gnome org
- Subject: Re: Bash script question.
- Date: Wed, 28 Mar 2001 21:35:36 +0200
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]