I want
1old2old
to become
--- cut here ---
1
2
--- cut here ---
Not
--- cut here ---
1
2
--- cut here ---
which awk '{gsub("old","\n"); print}' will give.
How to resolve the problem? Thanks.
--
1old2old
to become
--- cut here ---
1
2
--- cut here ---
Not
--- cut here ---
1
2
--- cut here ---
which awk '{gsub("old","\n"); print}' will give.
How to resolve the problem? Thanks.
--
>1old2old
>to become
>--- cut here ---
>1
>2
>--- cut here ---
>Not
>--- cut here ---
>1
>2
>--- cut here ---
>which awk '{gsub("old","\n"); print}' will give.
>How to resolve the problem? Thanks.
awk '{gsub("old","\n"); sub("\n$", ""); print}'
--
Genuity Managed Services, a Level(3) Company, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
> 1old2old
> to become
> --- cut here ---
> 1
> 2
> --- cut here ---
> Not
> --- cut here ---
> 1
> 2
> --- cut here ---
> which awk '{gsub("old","\n"); print}' will give.
awk '{gsub("old","\n"); printf("%s", $0)}'
--
> 1old2old
> to become
> --- cut here ---
> 1
> 2
> --- cut here ---
(you might need GNU awk).
--
Stphane
> 1old2old
> to become
> --- cut here ---
> 1
> 2
> --- cut here ---
> Not
> --- cut here ---
> 1
> 2
> --- cut here ---
> which awk '{gsub("old","\n"); print}' will give.
> How to resolve the problem? Thanks.
echo '1old2old' |
sed -e 's/old/\
/g -e 's/\n$//'
in the c-shell:
echo '1old2old' |\
sed -e 's/old/\\
/g' -e 's/\n$//'
>> 1old2old
>> to become
>> --- cut here ---
>> 1
>> 2
>> --- cut here ---
>> Not
>> --- cut here ---
>> 1
>> 2
>> --- cut here ---
>> which awk '{gsub("old","\n"); print}' will give.
>> How to resolve the problem? Thanks.
--
bill marcum the mushroom-eating laboratory monkey
What kind of monkey are you? http://thesurrealist.co.uk/monkey.cgi
1. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""
My machine: P166+mmx, 32mb ram, 4gb HD with Win95 and Win NT 4.0 and
redhat5.1 co-existed in different partitions.
I issued "sndconfig" within a xterm inside X Window, The program
detects the SB 16 pnp card sets it up with no error message, but when
it launch ModProbe to test out, it gets a message states: An error was
encountered running the ModProbe program." I tried different IRQ
settings, all ends with the same message.
2nd, When I try to mount /dev/cdrom from File Systerm Manager, the
following error is returned: Can't find /dev/hdb in /etc/mtab or
/etc/fstab.
3nd, When my machine boots, it halts at "Sendmail" for about 3-5 mins
before it goes to next step. Obviously there isn't any mail system on
the machine right now because it is a standalone. How can take this
mail thing out and speed up booting?
last one, Is my Zoom 56k PCI FaxModem a Windmodem that Linux can't use
to connect me to my local isp?
Experts help me out please. thanks.
2. linux startx
3. Type "(", ")" and "{", "}" in X...
4. Kernel memory hole on Linux 2.0.28
5. GETSERVBYNAME()????????????????????"""""""""""""
7. Why doesn't echo "text" 'command' "more text" work?
8. Book Opinion
9. "Box", "line drawing", "special graphics" characters in aixterm
10. Does FreeBSD 3.0' ksh support "print" and "function" ?
11. WHY 'exec "$REALFILE" ${1+"$@"}'
12. "McCabe's Cyclomatic Complexity" and "Halstead's Metrics"