I have some scripts that do fairly crude IPv4/6 validation testing. It is
generally
assumed that the input is coming from someone who knows what they are doing,
but even the
best of us have fat fingers sometimes :) Having standardized routines for
something like
this is great!
Thanks,
-Markham
On Aug 6, 2013, at 10:39 AM, Polytropon wrote:
> On Tue, 6 Aug 2013 16:50:37 +, Teske, Devin wrote:
>> And yes... to clarify... the port is a mirror of what's in 9.x base.
>> (however, see my recent notes in a separate reply; TL;DR: port is
>> 9.x only; proceed only if you know you don't care
On Tue, 6 Aug 2013 16:50:37 +, Teske, Devin wrote:
> And yes... to clarify... the port is a mirror of what's in 9.x base.
> (however, see my recent notes in a separate reply; TL;DR: port is
> 9.x only; proceed only if you know you don't care about the dialog(1)
> aspects of the library code).
On Aug 6, 2013, at 9:43 AM, Polytropon wrote:
> On Tue, 06 Aug 2013 10:20:05 -0600, markham breitbach wrote:
>> On 13-08-03 8:04 AM, Teske, Devin wrote:
>>> Actually, there's /usr/share/bsdconfig/media/tcpip.subr
>>>
>>>
>> I don't seem to have that (FreeBSD 8.3-RELEASE).
>> Where would I get
On Aug 6, 2013, at 9:20 AM, markham breitbach wrote:
> On 13-08-03 8:04 AM, Teske, Devin wrote:
>> Actually, there's /usr/share/bsdconfig/media/tcpip.subr
>>
>>
> I don't seem to have that (FreeBSD 8.3-RELEASE). Where would I get that
> from?
>
>
It's in up-coming 9.2-R (and present 9.2-
On Tue, 06 Aug 2013 10:20:05 -0600, markham breitbach wrote:
> On 13-08-03 8:04 AM, Teske, Devin wrote:
> > Actually, there's /usr/share/bsdconfig/media/tcpip.subr
> >
> >
> I don't seem to have that (FreeBSD 8.3-RELEASE).
> Where would I get that from?
Maybe from sysutils/bsdconfig in the ports
On 13-08-03 8:04 AM, Teske, Devin wrote:
> Actually, there's /usr/share/bsdconfig/media/tcpip.subr
>
>
I don't seem to have that (FreeBSD 8.3-RELEASE). Where would I get that from?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.or
On Aug 3, 2013, at 5:04 AM, Robert Huff wrote:
>
> Fbsd8 writes:
>
>> I have a .sh script that I need to determine if the entered IP
>> address is IPv4 or IPv6.
>>
>> Is there some .sh command that does this?
>
> Not that I know of.
>
On Aug 3, 2013, at 4:30 AM, Fbsd8 wrote:
> I have a .sh script that I need to determine if the entered IP address
> is IPv4 or IPv6.
>
> Is there some .sh command that does this?
>
In RELENG_9, soon to be released 9.2-R:
=== FILE: wis ===
#!/bin/sh
DEVICE_SELF_SCAN_AL
Fbsd8 writes:
> I have a .sh script that I need to determine if the entered IP
> address is IPv4 or IPv6.
>
> Is there some .sh command that does this?
Not that I know of.
But ... how hard can it be to figure out whether it
I have a .sh script that I need to determine if the entered IP address
is IPv4 or IPv6.
Is there some .sh command that does this?
Thanks
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To
I say this from a FreeBSD context. It may entirely be possible that a
Linux distro uses bash in /bin/sh
Yes. For most (all?) linux distros as well as osx, /bin/sh is actually
bash. When I say "emulation mode" I mean running a script with a
"#!/bin/sh" header on a system that doesn't have a rea
On May 18, 2013, at 5:06 PM, Teske, Devin wrote:
>
> On May 18, 2013, at 4:54 PM, Quartz wrote:
>
>>
>>> #foo works with sh
>>
>> Is it actually part of the official spec though is what I'm wondering, or is
>> it a case of other shells not rejecting 'advanced' statements when running
>> in
On May 18, 2013, at 4:54 PM, Quartz wrote:
>
>> #foo works with sh
>
> Is it actually part of the official spec though is what I'm wondering, or is
> it a case of other shells not rejecting 'advanced' statements when running in
> emulation.
>
Shells don't have an "emulation mode". The shell
By default, there is no bash on FreeBSD,
Right right... I know this, but forgot what list I was on :)
It doesn't help that I always install bash first thing on any freebsd
box or it get's installed automatically as part of pc-bsd anyway.
__
it has a certai
#foo works with sh
Is it actually part of the official spec though is what I'm wondering,
or is it a case of other shells not rejecting 'advanced' statements when
running in emulation.
At least FreeBSD's implementation of sh (which is ash, I think)
supports the # functionality.
The rea
On May 18, 2013, at 9:06 AM, Polytropon wrote:
> On Sat, 18 May 2013 11:58:30 -0400, Quartz wrote:
>>
newfoo=${foo:0:51}
>>>
>>> That works for bash, not sh.
>>
>> Ok granted, but I don't think that ${#foo} is straight sh either, so I
>> assumed "things bash/tcsh/ksh/whatever accep
On Sat, 18 May 2013 11:58:30 -0400, Quartz wrote:
>
> >> newfoo=${foo:0:51}
> >>
> >
> > That works for bash, not sh.
>
> Ok granted, but I don't think that ${#foo} is straight sh either, so I
> assumed "things bash/tcsh/ksh/whatever accept when running in sh
> emulation" were ok.
By default,
#foo works with sh
On May 18, 2013 10:58:30 AM Quartz wrote:
>> newfoo=${foo:0:51}
>>
>
> That works for bash, not sh.
Ok granted, but I don't think that ${#foo} is straight sh either, so I
assumed "things bash/tcsh/ksh/whatever accept when running in sh emulation"
were ok.
newfoo=${foo:0:51}
That works for bash, not sh.
Ok granted, but I don't think that ${#foo} is straight sh either, so I
assumed "things bash/tcsh/ksh/whatever accept when running in sh
emulation" were ok.
__
it has a certain smooth-brained appeal
_
However, if the OP wanted to actually truncate $FOO to 51
characters:
NEWFOO=$( echo "$FOO" | awk -v max=51 '{print substr($0,0,max)}' )
You don't need all that for a simple truncation/substring, you can do it
with a direct assignment:
newfoo=${foo:0:51}
The three params here are "variabl
On 05/18/2013 10:09 AM, Quartz wrote:
However, if the OP wanted to actually truncate $FOO to 51
characters:
NEWFOO=$( echo "$FOO" | awk -v max=51 '{print substr($0,0,max)}' )
You don't need all that for a simple truncation/substring, you can do it with a
direct assignment:
newfoo=${foo:0:5
On May 16, 2013, at 9:27 AM, Teske, Devin wrote:
On May 16, 2013, at 9:06 AM, Teske, Devin wrote:
On May 16, 2013, at 8:28 AM, Tim Daneliuk wrote:
On 05/16/2013 10:08 AM, Joe wrote:
Hello
Have script that has max size on content in a variable.
How to code size less than 51 characters?
FOO=
On May 16, 2013, at 9:06 AM, Teske, Devin wrote:
>
> On May 16, 2013, at 8:28 AM, Tim Daneliuk wrote:
>
>> On 05/16/2013 10:08 AM, Joe wrote:
>>> Hello
>>>
>>> Have script that has max size on content in a variable.
>>> How to code size less than 51 characters?
>>>
>>
>> FOO="Some string you
On 05/16/2013 10:45 AM, Dan Nelson wrote:
In the last episode (May 16), Tim Daneliuk said:
On 05/16/2013 10:08 AM, Joe wrote:
Hello
Have script that has max size on content in a variable.
How to code size less than 51 characters?
FOO="Some string you want to check length of"
FOOLEN=`echo $F
On May 16, 2013, at 8:28 AM, Tim Daneliuk wrote:
> On 05/16/2013 10:08 AM, Joe wrote:
>> Hello
>>
>> Have script that has max size on content in a variable.
>> How to code size less than 51 characters?
>>
>
> FOO="Some string you want to check length of"
> FOOLEN=`echo $FOO | wc | awk '{print
something like this:
#!/bin/sh
if [ $# -lt 1 ] ; then
echo "put a nickel in the slot, pal!"
exit 1;
fi
NUMCHARS=`echo $1 | wc -m`
if [ $NUMCHARS -lt 51 ] ; then
echo "You input "$NUMCHARS" characters."
exit 0
else
echo "whoa sailor I can't take all that!"
exit 1
fi
On 13-05-16 9:08 AM, Joe wrote
In the last episode (May 16), Tim Daneliuk said:
> On 05/16/2013 10:08 AM, Joe wrote:
> > Hello
> >
> > Have script that has max size on content in a variable.
> > How to code size less than 51 characters?
> >
>
> FOO="Some string you want to check length of"
> FOOLEN=`echo $FOO | wc | awk '{print
On 05/16/2013 10:08 AM, Joe wrote:
Hello
Have script that has max size on content in a variable.
How to code size less than 51 characters?
FOO="Some string you want to check length of"
FOOLEN=`echo $FOO | wc | awk '{print $3}'`
You can then use $FOOLEN in a conditional.
--
--
Hello
Have script that has max size on content in a variable.
How to code size less than 51 characters?
Thanks
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
Polytropon wrote:
On Wed, 20 Feb 2013 07:40:08 -0500, Fbsd8 wrote:
# write to file
> "${file}"
I'm thinking the file is never closed so on power failure I loose the
contents of the file.
How would I code a command to close the file?
The file is closed when the write operation has been
fin
On Wed, 20 Feb 2013 07:40:08 -0500, Fbsd8 wrote:
> # write to file
> > "${file}"
>
> I'm thinking the file is never closed so on power failure I loose the
> contents of the file.
>
> How would I code a command to close the file?
The file is closed when the write operation has been
finished. Yo
I noticed that when power fails I loose the contents of some files I am
using in a sh script.
I read and write the file this way
file="/usr/local/etc/filename"
# read file
. "${file}"
# write to file
> "${file}"
I'm thinking the file is never closed so
>I get this message [: 10.0.10.21: bad number on this code
>
>[ "${saved_ip}" -eq "${used_ip}" ] && echo "good match"
>
>Both variables have valid ip addresses in them.
>Why does it think the variable content is a number and not text?
>What am I doing wrong?
My guess would be that you didn't r
On Thu, 24 Jan 2013 16:16:54 -0500
Fbsd8 wrote:
> Robert Bonomi wrote:
> >> From owner-freebsd-questi...@freebsd.org Thu Jan 24 12:11:42 2013
> >> Date: Thu, 24 Jan 2013 13:07:40 -0500
> >> From: Fbsd8
> >> To: FreeBSD questions
> >> S
Robert Bonomi wrote:
From owner-freebsd-questi...@freebsd.org Thu Jan 24 12:11:42 2013
Date: Thu, 24 Jan 2013 13:07:40 -0500
From: Fbsd8
To: FreeBSD questions
Subject: sh script ?
I get this message [: 10.0.10.21: bad number on this code
[ "${saved_ip}" -eq "${used_ip}&q
> From owner-freebsd-questi...@freebsd.org Thu Jan 24 12:11:42 2013
> Date: Thu, 24 Jan 2013 13:07:40 -0500
> From: Fbsd8
> To: FreeBSD questions
> Subject: sh script ?
>
> I get this message [: 10.0.10.21: bad number on this code
>
> [ "${saved_ip}" -
On Thu, Jan 24, 2013 at 1:07 PM, Fbsd8 wrote:
> I get this message [: 10.0.10.21: bad number on this code
>
>[ "${saved_ip}" -eq "${used_ip}" ] && echo "good match"
>
> Both variables have valid ip addresses in them.
> Why does it think the variable content is a number and not text?
> What am
Use = for string comparison with the [ built-in and -eq for numerical
comparison.
--
Devin
On Jan 24, 2013, at 10:07 AM, Fbsd8 wrote:
> I get this message [: 10.0.10.21: bad number on this code
>
> [ "${saved_ip}" -eq "${used_ip}" ] && echo "good match"
>
> Both variables have valid ip ad
I get this message [: 10.0.10.21: bad number on this code
[ "${saved_ip}" -eq "${used_ip}" ] && echo "good match"
Both variables have valid ip addresses in them.
Why does it think the variable content is a number and not text?
What am I doing wrong?
Thanks for your help
_
> From owner-freebsd-questi...@freebsd.org Fri Jan 18 17:30:31 2013
> Date: Fri, 18 Jan 2013 18:26:54 -0500
> From: Fbsd8
> To: FreeBSD questions
> Subject: sh script code to get file size.
>
> In a script in am working on I need to find out the allocated
> size of a
On Fri, 18 Jan 2013, Fbsd8 wrote:
In a script in am working on I need to find out the allocated
size of a sparse file.
The only command that comes to mind is "ls -lh"
The "du -h" command is not appropriate because it will show
the occupied size and not the allocated size.
I don't know how to pa
Chris Hill wrote:
On Fri, 18 Jan 2013, Fbsd8 wrote:
In a script in am working on I need to find out the allocated
size of a sparse file.
The only command that comes to mind is "ls -lh"
The "du -h" command is not appropriate because it will show
the occupied size and not the allocated size.
I d
In a script in am working on I need to find out the allocated
size of a sparse file.
The only command that comes to mind is "ls -lh"
The "du -h" command is not appropriate because it will show
the occupied size and not the allocated size.
I don't know how to parse out to the position in the ou
On 18/01/2013 23:26, Fbsd8 wrote:
> In a script in am working on I need to find out the allocated
> size of a sparse file.
> The only command that comes to mind is "ls -lh"
> The "du -h" command is not appropriate because it will show
> the occupied size and not the allocated size.
>
> I don't know
In the last episode (Jan 18), Fbsd8 said:
> In a script in am working on I need to find out the allocated
> size of a sparse file.
> The only command that comes to mind is "ls -lh"
> The "du -h" command is not appropriate because it will show
> the occupied size and not the allocated size.
>
> I d
In a script in am working on I need to find out the allocated
size of a sparse file.
The only command that comes to mind is "ls -lh"
The "du -h" command is not appropriate because it will show
the occupied size and not the allocated size.
I don't know how to parse out to the position in the outpu
Lowell Gilbert wrote:
Fbsd8 writes:
Lowell Gilbert wrote:
This fixes the problem that was bothering you, but the interactions of
different features are complicated, and many of them are documented in
fairly loose language.
Is that the diplomatic way of saying the manpage for mtree sucks,
Fbsd8 writes:
> Lowell Gilbert wrote:
>> This fixes the problem that was bothering you, but the interactions of
>> different features are complicated, and many of them are documented in
>> fairly loose language.
>>
> Is that the diplomatic way of saying the manpage for mtree sucks, and
> leaves
Fbsd8 writes:
> Let me be sure I understand you correctly.
> Your saying you tested the NetBSD version of mtree that was committed
> into 10.0 head and it also has the bug we found?
No. The port is not complete. All I did was a code inspection.
___
fre
Lowell Gilbert wrote:
Fbsd8 writes:
Lowell Gilbert wrote:
Lowell Gilbert writes:
I think it's a real bug, and the test cases don't cover "extra" elements
at all. Now I just have to figure out the right fix.
I'm pretty sure that the fix is just to set rval on jumping to the
"extra" tag in
Lowell Gilbert wrote:
Adam Vande More writes:
On Wed, Jan 9, 2013 at 7:23 PM, Lowell Gilbert <
freebsd-questions-lo...@be-well.ilk.org> wrote:
Lowell Gilbert writes:
I think it's a real bug, and the test cases don't cover "extra" elements
at all. Now I just have to figure out the right fi
Adam Vande More writes:
> On Wed, Jan 9, 2013 at 7:23 PM, Lowell Gilbert <
> freebsd-questions-lo...@be-well.ilk.org> wrote:
>
>> Lowell Gilbert writes:
>>
>> > I think it's a real bug, and the test cases don't cover "extra" elements
>> > at all. Now I just have to figure out the right fix.
>>
>
Fbsd8 writes:
> Lowell Gilbert wrote:
>> Lowell Gilbert writes:
>>
>>> I think it's a real bug, and the test cases don't cover "extra" elements
>>> at all. Now I just have to figure out the right fix.
>>
>> I'm pretty sure that the fix is just to set rval on jumping to the
>> "extra" tag in vwal
On Wed, Jan 9, 2013 at 7:23 PM, Lowell Gilbert <
freebsd-questions-lo...@be-well.ilk.org> wrote:
> Lowell Gilbert writes:
>
> > I think it's a real bug, and the test cases don't cover "extra" elements
> > at all. Now I just have to figure out the right fix.
>
> I'm pretty sure that the fix is jus
Lowell Gilbert wrote:
Lowell Gilbert writes:
I think it's a real bug, and the test cases don't cover "extra" elements
at all. Now I just have to figure out the right fix.
I'm pretty sure that the fix is just to set rval on jumping to the
"extra" tag in vwalk() in src/usr.sbin/mtree/verify.c.
Lowell Gilbert writes:
> I think it's a real bug, and the test cases don't cover "extra" elements
> at all. Now I just have to figure out the right fix.
I'm pretty sure that the fix is just to set rval on jumping to the
"extra" tag in vwalk() in src/usr.sbin/mtree/verify.c.
But my hot water hea
Lowell Gilbert writes:
> It's not; ignore my example. The extra directory was under the ignored
> directory, so it's testing the right properties. I think if I create the
> new subdirectory under the other main directory, it would be right.
Confirmed. The test case now looks like this:
=
Lowell Gilbert writes:
> and I think the problem you're having is that the second "echo $?"
> should be 2, although the others are correct at 0. Is that correct?
It's not; ignore my example. The extra directory was under the ignored
directory, so it's testing the right properties. I think if I
Fbsd8 writes:
> So the question remains, why is mtree giving a return of zero when it
> finds directories on the target that are not in the spec file?
Okay, I had a hard time figuring out your examples, but I think I've got
an independent repeatable test case for the problem.
==
Lowell Gilbert wrote:
Fbsd8 writes:
Polytropon wrote:
On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote:
I can not get the return code from mtree to control
the displaying of a error message.
The mtree at the end of the script does function correctly
because I can tell from the printed output
Fbsd8 writes:
> Polytropon wrote:
>> On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote:
>>> I can not get the return code from mtree to control
>>> the displaying of a error message.
>>>
>>> The mtree at the end of the script does function correctly
>>> because I can tell from the printed output.
>
Polytropon wrote:
On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote:
I can not get the return code from mtree to control
the displaying of a error message.
The mtree at the end of the script does function correctly
because I can tell from the printed output.
When mtree prints comments saying "ex
On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote:
>
> I can not get the return code from mtree to control
> the displaying of a error message.
>
> The mtree at the end of the script does function correctly
> because I can tell from the printed output.
>
> When mtree prints comments saying "extra"
I can not get the return code from mtree to control
the displaying of a error message.
The mtree at the end of the script does function correctly
because I can tell from the printed output.
When mtree prints comments saying "extra" that means the directory being
read does not match the specifi
On Thu, Jun 03, 2010 at 11:11:16PM +0700, Anh Ky Huynh wrote:
> On Wed, 02 Jun 2010 20:25:36 -0400 Vinny wrote:
> > On 06/02/2010 04:30, Matthew Seaman wrote:
> > > On 02/06/2010 09:24:01, Matthias Apitz wrote:
> > > > Aiza wrote:
> > > >
> > > > > I have this code
> > [snip]
> > > > $ echo 'archiv
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 03/06/2010 17:11:16, Anh Ky Huynh wrote:
> On Wed, 02 Jun 2010 20:25:36 -0400
> Vinny wrote:
>> On 06/02/2010 04:30, Matthew Seaman wrote:
>>> archive_name=${fromarchive%-*}
>> Thanks Matthew, that's really neat. It took me a long time
>> to fin
On Wed, 02 Jun 2010 20:25:36 -0400
Vinny wrote:
> On 06/02/2010 04:30, Matthew Seaman wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On 02/06/2010 09:24:01, Matthias Apitz wrote:
> >> El dÃa Wednesday, June 02, 2010 a las 04:15:22PM +0800, Aiza
> >> escribió:
> >>
> >>> I
On 06/02/2010 04:30, Matthew Seaman wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 02/06/2010 09:24:01, Matthias Apitz wrote:
El dÃa Wednesday, June 02, 2010 a las 04:15:22PM +0800, Aiza escribió:
I have this code
[snip]
$ echo 'archivename-201006021514.34.tar.gz' | sed 's/-.*$//
On Wed, 02 Jun 2010 16:15:22 +0800, Aiza wrote:
> I have this code
>
> archive_name=`echo -n "${fromarchive}" | tr -c '[:alnum:]' _`
>
> ` is the key under Esc key and ' key is next to enter key.
>
> fromarchive value is archivename-201006021514.34.tar.gz
>
> I want to strip the suffix -20100
On Wed, Jun 2, 2010 at 3:24 AM, Matthias Apitz wrote:
> El día Wednesday, June 02, 2010 a las 04:15:22PM +0800, Aiza escribió:
>
> > I have this code
> >
> > archive_name=`echo -n "${fromarchive}" | tr -c '[:alnum:]' _`
> >
> > ` is the key under Esc key and ' key is next to enter key.
> >
> > f
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 02/06/2010 09:24:01, Matthias Apitz wrote:
> El día Wednesday, June 02, 2010 a las 04:15:22PM +0800, Aiza escribió:
>
>> I have this code
>>
>> archive_name=`echo -n "${fromarchive}" | tr -c '[:alnum:]' _`
>>
>> ` is the key under Esc key and ' ke
El día Wednesday, June 02, 2010 a las 04:15:22PM +0800, Aiza escribió:
> I have this code
>
> archive_name=`echo -n "${fromarchive}" | tr -c '[:alnum:]' _`
>
> ` is the key under Esc key and ' key is next to enter key.
>
> fromarchive value is archivename-201006021514.34.tar.gz
>
> I want to
I have this code
archive_name=`echo -n "${fromarchive}" | tr -c '[:alnum:]' _`
` is the key under Esc key and ' key is next to enter key.
fromarchive value is archivename-201006021514.34.tar.gz
I want to strip the suffix -201006021514.34.tar.gz from the archivename.
The archivename can be up
On Sun, 30 May 2010 13:14:01 +0800, Aiza wrote:
> In a .sh type script I have && exerr " very long message gt 250 char"
> all on the same line. This is a real pain to edit.
>
> Is there some code a can use to continue this on the next line so I
> can see it on the screen and still have the command
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 30/05/2010 07:58:58, Aiza wrote:
> Anh Ky Huynh wrote:
>> On Sun, 30 May 2010 14:10:36 +0800
>> Aiza wrote:
>>
>>> Dan Nelson wrote:
In the last episode (May 30), Aiza said:
> In a .sh type script I have && exerr " very long message gt 250
Anh Ky Huynh wrote:
On Sun, 30 May 2010 14:10:36 +0800
Aiza wrote:
Dan Nelson wrote:
In the last episode (May 30), Aiza said:
In a .sh type script I have && exerr " very long message gt 250
char" all on the same line. This is a real pain to edit.
Is there some code a can use to continue thi
On Sun, 30 May 2010 14:10:36 +0800
Aiza wrote:
> Dan Nelson wrote:
> > In the last episode (May 30), Aiza said:
> >> In a .sh type script I have && exerr " very long message gt 250
> >> char" all on the same line. This is a real pain to edit.
> >>
> >> Is there some code a can use to continue thi
Dan Nelson wrote:
In the last episode (May 30), Aiza said:
In a .sh type script I have && exerr " very long message gt 250 char"
all on the same line. This is a real pain to edit.
Is there some code a can use to continue this on the next line so I can
see it on the screen and still have the c
In the last episode (May 30), Aiza said:
> In a .sh type script I have && exerr " very long message gt 250 char"
> all on the same line. This is a real pain to edit.
>
> Is there some code a can use to continue this on the next line so I can
> see it on the screen and still have the command func
In a .sh type script I have && exerr " very long message gt 250 char"
all on the same line. This is a real pain to edit.
Is there some code a can use to continue this on the next line so I can
see it on the screen and still have the command function? I tried \ with
no luck.
thanks
__
In the last episode (Nov 01), David Naylor said:
> Hi,
>
> I am having a hard time getting (very complex script for me) to work. The
> basic idea is that this script runs a bunch of tarkets, many of which are
> time consuming but low on resources (such as downloading files). Now if I
> run the t
On Thu, 1 Nov 2007, David Naylor wrote:
> Hi,
>
> I am having a hard time getting (very complex script for me) to work. The
> basic idea is that this script runs a bunch of tarkets, many of which are
> time consuming but low on resources (such as downloading files). Now if I
> run the tarkets a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/1/07, David Naylor wrote:
> # !!! Somehow wait for over workers to finish before continuing !!!
> }
>
> #Finished
>
> Furthermore, how can signals be handled such that the signals get
> accumulated and once all the other workers have finishe
Hi,
I am having a hard time getting (very complex script for me) to work. The
basic idea is that this script runs a bunch of tarkets, many of which are
time consuming but low on resources (such as downloading files). Now if I
run the tarkets all at once (given some dependancy issues) it greatly
On Fri, 2 Feb 2007 22:11:56 +1100, Tigger <[EMAIL PROTECTED]> wrote
> Hello, the following simply sh script is outputting unexpected results.
> Any idea why?
> --script--
> #!/bin/sh
> started=`date`
> echo "Started at: $started"
> echo "Finished : &qu
On Fri, Feb 02, 2007 at 01:48:31PM +0100, J65nko wrote:
> On 2/2/07, Tigger <[EMAIL PROTECTED]> wrote:
> >Hello, the following simply sh script is outputting unexpected results.
> >Any idea why?
> >
> >--script--
> >
> >#!/bin/sh
> >
> >
On 2/2/07, Tigger <[EMAIL PROTECTED]> wrote:
Hello, the following simply sh script is outputting unexpected results.
Any idea why?
--script--
#!/bin/sh
started=`date`
echo "Started at: $started"
echo "Finished : "`date`
exit
--output--
Started at: Fri Feb 2
Hello, the following simply sh script is outputting unexpected results.
Any idea why?
--script--
#!/bin/sh
started=`date`
echo "Started at: $started"
echo "Finished : "`date`
exit
--output--
Started at: Fri Feb 2 22:13:51 EST 2007
Finished : Fri Feb 2 22:13:51
Garrett Cooper wrote:
Hello again all,
Just making a series of sh scripts to help automate updating and
whatnot of my fileserver (since I am trying to avoid having mistakes
occur with my system, and maybe help the community out a bit by
providing some decent means of updating their own mac
On Tue, 11 Apr 2006, [EMAIL PROTECTED] wrote:
> On Mon, 10 Apr 2006 22:30:32 -0700 Garrett Cooper wrote (my brief response
> follows all of his text):
>
> Just making a series of sh scripts to help automate updating and
> whatnot of my fileserver (since I am trying to avoid having mistake
On Mon, 10 Apr 2006 22:30:32 -0700 Garrett Cooper wrote (my brief response
follows all of his text):
Just making a series of sh scripts to help automate updating and
whatnot of my fileserver (since I am trying to avoid having mistakes
occur with my system, and maybe help the community out
in message <[EMAIL PROTECTED]>,
wrote Garrett Cooper thusly...
>
> I was wondering if anyone could help me out with the following
> script I've developing (the grep if statements are incorrect..):
>
> #!/bin/sh
> #
>
> KC="";
>
> cd /usr/src;
>
> if [ -n `grep -e s/KERNCONF=/ /etc/make.conf` ]
On Tuesday 11 April 2006 06:30, Garrett Cooper wrote:
> cd /usr/src;
> if [ -n `grep -e s/KERNCONF=/ /etc/make.conf` ] # want to look for
> KERNCONF in /etc/make.conf
if [ `make -V KERNCONF` ]
> read KERNCONF;
> KC="KERNCONF=$KERNCONF";
> fi
You need to check that KC actually e
Hello again all,
Just making a series of sh scripts to help automate updating and
whatnot of my fileserver (since I am trying to avoid having mistakes
occur with my system, and maybe help the community out a bit by
providing some decent means of updating their own machines), and I was
wonde
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
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:/
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 "${
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
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
1 - 100 of 115 matches
Mail list logo