[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] linha
From: |
Felipe Kellermann |
Subject: |
Re: [shell-script] linha |
Date: |
Wed, 6 Aug 2003 14:21:17 -0300 (BRT) |
On Wed, 6 Aug 2003 9:36am -0300, Junior Mulinari wrote:
> outra parte da linha, e não sei fazer isso com o sed, veja:
>
> a linha
> 192.168.0.170 Sim 00:01:02:CC:F3:F8 secensino Linux
> tenho que substituir o "Sim", por um "<a
> href="sh.sh:192.168.0.170"Sim<\a>", quer dizer, ele ao mesmo tempo que
O exemplo que mandei antes não tinha o href.
Mas funciona em qualquer shell:
$ s="192.168.0.170 Sim 00:01:02:CC:F3:F8 secensino Linux"
$ echo "${s/Sim/<a href="sh.sh:${s%% *}">Sim</a>}"
192.168.0.170 <a href="sh.sh:192.168.0.170">Sim</a> 00:01:02:CC:F3:F8
secensino Linux
PS: E não seria "sh.sh?endereço"? :-)
--
Felipe Kellermann