Re: help with sh script

2005-07-04 Thread FreeBSD questions mailing list
On 03 jul 2005, at 19:03, fbsd_user wrote: On Sun, 3 Jul 2005 12:14:05 -0400 "fbsd_user" <[EMAIL PROTECTED]> wrote: Thanks but I need a little more help. num_ip="(printf $raw_ip | sed 's/\.//g')" gives me a error. What would the correct syntax be? I am trying to write script to insert ru

Re: help with sh script

2005-07-04 Thread Roland Smith
On Sun, Jul 03, 2005 at 01:03:40PM -0400, fbsd_user wrote: > > I get this error "printf missing format character" > > Does sed need different syntax or have I got it all wrong? Issue the following command and be enlightend: man 1 printf Or just use 'echo' instead. Roland -- R.F.Smith (http:/

Re: help with sh script

2005-07-03 Thread Giorgos Keramidas
On 2005-07-03 09:39, fbsd_user <[EMAIL PROTECTED]> wrote: > What is the sh coding to strip the periods from a IP address?? > > raw_ip='10.0.10.5' this is starting > num_ip='100105'and this is what I need to convert to. There are many ways: echo "${raw_ip}" | sed -e 's/\.//g' echo "${

Re: help with sh script

2005-07-03 Thread Alejandro Pulver
On Sun, 3 Jul 2005 14:59:32 -0400 "fbsd_user" <[EMAIL PROTECTED]> wrote: > > > std_text='No ALTQ support in kernel ALTQ related functions disabled' > ret_ob='No ALTQ support in kernel ALTQ related functions disabled > OK' > > ret_ob=`printf "$ret_ob" | sed 's/\$std_text//g'` > Does not strip of

Re: help with sh script

2005-07-03 Thread FreeBSD questions mailing list
On 03 jul 2005, at 20:59, fbsd_user wrote: std_text='No ALTQ support in kernel ALTQ related functions disabled' ret_ob='No ALTQ support in kernel ALTQ related functions disabled OK' ret_ob=`printf "$ret_ob" | sed 's/\$std_text//g'` Does not strip off the std_text stuff. How would I code a s

RE: help with sh script

2005-07-03 Thread fbsd_user
std_text='No ALTQ support in kernel ALTQ related functions disabled' ret_ob='No ALTQ support in kernel ALTQ related functions disabled OK' ret_ob=`printf "$ret_ob" | sed 's/\$std_text//g'` Does not strip off the std_text stuff. How would I code a statement to remove everything from $ret_ob but

Re: help with sh script

2005-07-03 Thread FreeBSD questions mailing list
On 03 jul 2005, at 17:18, fbsd_user wrote: On 03 jul 2005, at 15:39, fbsd_user wrote: What is the sh coding to strip the periods from a IP address?? raw_ip='10.0.10.5' this is starting num_ip='100105'and this is what I need to convert to. Hi, many ways, here's one: pri

RE: help with sh script

2005-07-03 Thread fbsd_user
On Sun, 3 Jul 2005 12:14:05 -0400 "fbsd_user" <[EMAIL PROTECTED]> wrote: >> Thanks but I need a little more help. >> >> num_ip="(printf $raw_ip | sed 's/\.//g')" >> >> gives me a error. >> >> What would the correct syntax be? >> >> I am trying to write script to insert rules into PF firewall >> on

Re: help with sh script

2005-07-03 Thread Roland Smith
On Sun, Jul 03, 2005 at 12:14:05PM -0400, fbsd_user wrote: > >many ways, here's one: > > > >printf '10.0.10.5' | sed 's/\.//g' > > > >Arno > > * > > Thanks but I need a little more help. > > num_ip="(printf $raw_ip | sed 's/\.//g')" > > gives me a error.

Re: help with sh script

2005-07-03 Thread Alejandro Pulver
On Sun, 3 Jul 2005 12:14:05 -0400 "fbsd_user" <[EMAIL PROTECTED]> wrote: > Thanks but I need a little more help. > > num_ip="(printf $raw_ip | sed 's/\.//g')" > > gives me a error. > > What would the correct syntax be? > > I am trying to write script to insert rules into PF firewall > on 5.4.

RE: help with sh script

2005-07-03 Thread fbsd_user
On 03 jul 2005, at 15:39, fbsd_user wrote: >> What is the sh coding to strip the periods from a IP address?? >> >> >> raw_ip='10.0.10.5' this is starting >> num_ip='100105'and this is what I need to convert to. >> >> >> >Hi, >many ways, here's one: > >printf '10.0.10.5' | sed 's/\./

Re: help with sh script

2005-07-03 Thread FreeBSD questions mailing list
On 03 jul 2005, at 15:39, fbsd_user wrote: What is the sh coding to strip the periods from a IP address?? raw_ip='10.0.10.5' this is starting num_ip='100105'and this is what I need to convert to. Hi, many ways, here's one: printf '10.0.10.5' | sed 's/\.//g' Arno __