BB Unix Network Monitor - Message

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

Re: {bb} {BB} OT: sed problem..



> You can try use...
> 
> session_reg=`echo  $session | sed -e 's#\/#\\\/#g'`
> 
> less slash to worry about and i did a short try and it worked.
> 
> -----
> [tcadm@hera /]$ echo $session
> 2006/23/12
> [tcadm@hera /]$ echo  $session | sed -e 's/\//\\\//g'
> 2006\/23\/12
> [tcadm@hera /]$ echo  $session | sed -e 's#\/#\\\/#g'
> 2006\/23\/12
> [tcadm@hera /]$ session_reg=`echo  $session | sed -e 's#\/#\\\/#g'`
> [tcadm@hera /]$ echo $session_reg
> 2006\/23\/12


That indeed dit the trick, good to know you can use something else then / 
as a seperation token with sed.

Thanks everyone for the great responses :)

Greetings,
/Frank.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index