On Thu, 02 Sep 2010 15:52:25 +0200, Bernard Scharp
wrote:
> Neither am I. Hadn't even thought of grepping in /usr/src for the error
> message :-)
It's often a good starting point to see where problems might
be caused from.
> Can I just `rm /dev/nsmbX` them? (messing in /dev/ is a level of Fre
On 02/09/2010 15:29, Polytropon wrote:
> On Thu, 02 Sep 2010 14:02:35 +0200, Bernard Scharp
> wrote:
>>
>>>
>>> Could you post the script? Anything else would be pure guess work. You
>>
>> Well, I can recreate it with something as simple as:
>>
>> #!/usr/local/bin/bash
>> mount_smbfs //u...@remot
On Thu, 02 Sep 2010 14:02:35 +0200, Bernard Scharp
wrote:
>
> >
> > Could you post the script? Anything else would be pure guess work. You
>
> Well, I can recreate it with something as simple as:
>
> #!/usr/local/bin/bash
> mount_smbfs //u...@remotehost/share1/ /tmp/mnt/
> mount_smbfs //u...@
>
> Could you post the script? Anything else would be pure guess work. You
Well, I can recreate it with something as simple as:
#!/usr/local/bin/bash
mount_smbfs //u...@remotehost/share1/ /tmp/mnt/
mount_smbfs //u...@remotehost/share2/ /tmp/mnt2/
> also might consider posting this on the "BAS
On Thu, 02 Sep 2010 10:24:05 +0200
Bernard Scharp articulated:
> Hi all,
>
> I'm having some problems with a bash script.
>
> It's a backup script that periodically checks if a list of systems is
> online, and if so, uses samba to mount a specified list of shar
Hi all,
I'm having some problems with a bash script.
It's a backup script that periodically checks if a list of systems is
online, and if so, uses samba to mount a specified list of shares,
rsyncs them to a local directory and unmounts again.
This used to run fine till a few months ag
Drew Tomlinson writes:
> It finally occurred to me that I needed the shell to see a new line as
> the delimiter and not whitespace. Then a simple search revealed my
> answer:
>
> O=$IFS
> IFS=$(echo -en "\n\b")
>
> IFS=$O
Old IFS value can be preserved by using `local' keyword or (...) braces,
>> On Tue, 17 Aug 2010 07:47:25 -0700,
>> Drew Tomlinson said:
D> Then I attempt to use 'basename' to extract the file name to a variable
D> which I can later pass to 'ln'. This seems to work:
D> basename "/archive/Multimedia/Audio/Music/Billboard Top USA
D> Singles/1980-028 Kenny Loggins -
Am Dienstag, den 17.08.2010, 08:22 -0700 schrieb Chip Camden:
> find -E ... | while read i; do; basename $i; done
The semicolon behind "do" isn't necessary.
--
Timm
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listin
On 8/17/2010 8:22 AM, Chip Camden wrote:
Quoth Drew Tomlinson on Tuesday, 17 August 2010:
I have a collection of yearly top 100 Billboard mp3s in this format (all
one line - sorry if it wraps):
/archive/Multimedia/Audio/Music/Billboard Top USA Singles/1980-028 Kenny
Loggins - This Is It.mp3
On 8/17/2010 7:47 AM, Drew Tomlinson wrote:
I have a collection of yearly top 100 Billboard mp3s in this format
(all one line - sorry if it wraps):
/archive/Multimedia/Audio/Music/Billboard Top USA Singles/1980-028
Kenny Loggins - This Is It.mp3
I want to create symbolic links to the top 30
Quoth Drew Tomlinson on Tuesday, 17 August 2010:
> I have a collection of yearly top 100 Billboard mp3s in this format (all
> one line - sorry if it wraps):
>
> /archive/Multimedia/Audio/Music/Billboard Top USA Singles/1980-028 Kenny
> Loggins - This Is It.mp3
>
> I want to create symbolic link
I have a collection of yearly top 100 Billboard mp3s in this format (all
one line - sorry if it wraps):
/archive/Multimedia/Audio/Music/Billboard Top USA Singles/1980-028 Kenny
Loggins - This Is It.mp3
I want to create symbolic links to the top 30 in 1966-1969 in another
directory for easy m
On Tue, Dec 01, 2009 at 11:10:33PM +0100, Polytropon wrote:
> On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline wrote:
> > Hi guys,
> >
> > Here's a bash-related question, kind-of. Is there any way to
> > automagically run my .csrhc thru a script and wi
out having to install any
> >>>ports.
> >>That's a very good advice. Using sh is strongly recommended
> >>for maximal portability. Use sh if you're not requiring
> >>features that are bash-only.
> >>
> >>
> >
> > Hi
On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline wrote:
> Hi guys,
>
> Here's a bash-related question, kind-of. Is there any way to
> automagically run my .csrhc thru a script and wind up with a
> bash script?
csh and (ba)sh use dufferent syntax and
t are bash-only.
Hi guys,
Here's a bash-related question, kind-of. Is there any way to
automagically run my .csrhc thru a script and wind up with a
bash script?
gary
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user sin
ty. Use sh if you're not requiring
> features that are bash-only.
>
>
Hi guys,
Here's a bash-related question, kind-of. Is there any way to
automagically run my .csrhc thru a script and wind up with a
bash script?
gary
>
>
On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen
wrote:
> Why are you using bash? To make a shell script as portable as possible,
> use /bin/sh. Bash is a third party shell, that isn't included in a base
> installation (you're not using bash as root's shell, are you?). By using
> /bin/sh, yo
Dánielisz László wrote:
I just find out:
#!/usr/local/bin/bash
export IFS=" "
cuc=$*
mkdir "cuc"
Thanks anyway!
László
From: Dánielisz László
To: freebsd-questions@freebsd.org
Sent: Tue, December 1, 2009 8:37:04 PM
Subject: bash scr
On Tue, 1 Dec 2009 11:48:43 -0800 (PST), Dánielisz László
wrote:
> I just find out:
>
> #!/usr/local/bin/bash
> export IFS=" "
> cuc=$*
> mkdir "cuc"
The $* variable will expand to all arguments given on the
command line, e. g.
$ ./myscript foo bar baz
will result in
mkdir "f
Hello,
I'd like to ask how can I read a variable in the same line when I launch a
script?
For example "./script.sh directory_name", and I want the script to creat the
directory called "directory_name" or whatever I input there.
Thank you!
László
__
I just find out:
#!/usr/local/bin/bash
export IFS=" "
cuc=$*
mkdir "cuc"
Thanks anyway!
László
From: Dánielisz László
To: freebsd-questions@freebsd.org
Sent: Tue, December 1, 2009 8:37:04 PM
Subject: bash script question
Hello,
I
Matthew Seaman wrote:
> > It would do no good for the kernel to hand the interpreter an
> > open descriptor if the interpreter did not somehow know to read
> > the script from that open descriptor instead of opening the
> > script file by name.
>
> Errr -- no. That's what fdescfs(5) is for. Wh
per...@pluto.rain.com wrote:
RW wrote:
On Sat, 29 Aug 2009 00:06:29 -0700
per...@pluto.rain.com wrote:
Actually, absent some careful cooperation between the
kernel and the interpreter to prevent a race condition ...
isn't that the same issue that Matthew Seaman was saying
was fixed years ago
RW wrote:
> On Sat, 29 Aug 2009 00:06:29 -0700
> per...@pluto.rain.com wrote:
> > Actually, absent some careful cooperation between the
> > kernel and the interpreter to prevent a race condition ...
>
> isn't that the same issue that Matthew Seaman was saying
> was fixed years ago ... and is descr
Perhaps a better idea than a setuid shell script, would be to figure out
just what it is about your script that really needs to be executed as root.
When write a C program that can do just that one thing - and absolutely
nothing else.
If it takes any kind of input, or command line parameters,
RW wrote:
On Sat, 29 Aug 2009 00:06:29 -0700
per...@pluto.rain.com wrote:
Michael David Crawford wrote:
It's not that setuid shell scripts are really more
inherently insecure than programs written in C.
Actually, absent some careful cooperation between the kernel
and the interpreter to preve
On Fri, Aug 28, 2009 at 08:10:59PM -0600, Tim Judd wrote:
> On 8/28/09, RW wrote:
> > On Fri, 28 Aug 2009 11:54:19 +0300
> > Giorgos Keramidas wrote:
> >
> >> On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
> >> wrote:
> >
> >> > As far as i know, using SUID, script must runs with root
> >>
On Sat, 29 Aug 2009 00:06:29 -0700
per...@pluto.rain.com wrote:
> Michael David Crawford wrote:
> > It's not that setuid shell scripts are really more
> > inherently insecure than programs written in C.
>
> Actually, absent some careful cooperation between the kernel
> and the interpreter to pre
On Sat, 29 Aug 2009 00:17:24 -0700, Michael David Crawford
wrote:
> I came across a page that explained all the different ways setuid
> scripts could screw up - one would have to be a rocket scientist to
> avoid all the potential pitfalls.
Hi Michael,
It would be a very useful addition to the l
per...@pluto.rain.com wrote:
> Actually, absent some careful cooperation between the kernel
> and the interpreter to prevent a race condition that can cause
> the interpreter to run (with elevated permissions) a completely
> different script than the one that was marked setuid, setuid
> scripts _a
Michael David Crawford wrote:
> It's not that setuid shell scripts are really more
> inherently insecure than programs written in C.
Actually, absent some careful cooperation between the kernel
and the interpreter to prevent a race condition that can cause
the interpreter to run (with elevated pe
RW wrote:
So are scripts actually incapable of running setuid?
They aren't on Linux. I learned about that a while back when I
investigated setuid scripts for a coworker.
It's not that setuid shell scripts are really more inherently insecure
than programs written in C. The problem is more
On Sat, 29 Aug 2009 02:24:31 +0100, RW wrote:
>On Fri, 28 Aug 2009 11:54:19 +0300 Giorgos Keramidas
> wrote:
>>On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
>> wrote:
>>> As far as i know, using SUID, script must runs with root
>>> permissions... so i shoudnt get "Permission denied", what i
On Fri, 28 Aug 2009 20:10:59 -0600, Tim Judd wrote:
> Dunno, but this dawns on me..
>
> what defines a script? I've always defined a script that starts with
> a #! shebang.
>
> So the script can be SUID, but the interpreter/shell isn't. Is that
> why it doesn't work?
What is the difference of
On 8/28/09, RW wrote:
> On Fri, 28 Aug 2009 11:54:19 +0300
> Giorgos Keramidas wrote:
>
>> On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
>> wrote:
>
>> > As far as i know, using SUID, script must runs with root
>> > permissions... so i shoudnt get "Permission denied", what im doing
>> > wro
On Fri, 28 Aug 2009 11:54:19 +0300
Giorgos Keramidas wrote:
> On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
> wrote:
> > As far as i know, using SUID, script must runs with root
> > permissions... so i shoudnt get "Permission denied", what im doing
> > wrong??
>
> No it must not. There a
On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
wrote:
> content of script:
> ]#!/usr/local/bin/bash
^
This ] doesn't belong to the script, does it?
Furthermore, why do you employ bash for calling another program?
It's standard to use sh (#!/bin/sh) if you don't use bash-specific
commands a
On Fri, Aug 28, 2009 at 10:01:54AM +0100, Jeronimo Calvo wrote:
> 2009/8/28 Giorgos Keramidas
>
> On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
> wrote:
> > >
> > > Im trying to set up a reaaallly basic scrip to allow one user to
> > > shutdown my machine without root permisions, seting up
On Friday 28 August 2009 10:54:19 Giorgos Keramidas wrote:
> On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
wrote:
> > Hi folks!
> >
> > Im trying to set up a reaaallly basic scrip to allow one user to shutdown
> > my machine without root permisions, seting up SUID as follows:
>
[snip]
>
> Th
Aham!
so SUID can be applied to sh but it doesn't work!, there is not anyway to
apply it? apart from installing sudo?, The thing is that installing sudo and
adding that user into sudoers, that user will be capable to do any other SU
tasks, apart of shutting down... wich i dont like :D (I know that
On Fri, 28 Aug 2009 09:24:35 +0100, Jeronimo Calvo
wrote:
> Hi folks!
>
> Im trying to set up a reaaallly basic scrip to allow one user to shutdown my
> machine without root permisions, seting up SUID as follows:
>
>
> -rwsrwxr-- 1 root wheel 38 Aug 27 23:12 apagar.sh
>
> $ ./apagar.sh
>
> Permis
Hi folks!
Im trying to set up a reaaallly basic scrip to allow one user to shutdown my
machine without root permisions, seting up SUID as follows:
-rwsrwxr-- 1 root wheel 38 Aug 27 23:12 apagar.sh
$ ./apagar.sh
Permission denied
content of script:
cat apagar.sh
]#!/usr/local/bin/bash
shut
I botched the filter example in my previous blathering. This will ignore
output from find containing patterns:
root# find . -depth -print | fgrep -v -f /some/patterns
Leaving off the -v will keep output containing those patterns.
--
Karl Vogel I don't speak for the USAF
>> On Tuesday, June 16, 2009 08:09:09 -0500 Carmel NY
>> wrote:
C> I am attempting to write a simple Bash script that will find all the
C> '*.pem' files in a directory structure and move them to another
C> directory.
Using find and pax will correctly h
On Tuesday 16 June 2009 06:03:33 Daniel Underwood wrote:
> > $ find ./ -name "*.pem" -exec cp {} /usr/home/tmp/something \;
>
> I'm a novice with shell scripting myself, but what's the difference
> between that code and some variant thereof using a pipe and "xargs"?
> Are they simply two different
Carmel NY wrote:
I am attempting to write a simple Bash script that will find all the
'*.pem' files in a directory structure and move them to another
directory. It seems to work until I get to the copy part where it fails.
My scripting skills are not that good. Perhaps someone cou
On Tue, Jun 16, 2009 at 02:33:37PM +, Paul Schmehl wrote:
> --On Tuesday, June 16, 2009 08:09:09 -0500 Carmel NY
> wrote:
>
> >
> >I am attempting to write a simple Bash script that will find all the
> >'*.pem' files in a directory structure and move t
--On Tuesday, June 16, 2009 08:09:09 -0500 Carmel NY
wrote:
I am attempting to write a simple Bash script that will find all the
'*.pem' files in a directory structure and move them to another
directory. It seems to work until I get to the copy part where it fails.
My scripting
On Tue, 16 Jun 2009 15:56:15 +0200
Bertram Scharpf wrote:
> Hi,
>
> Am Dienstag, 16. Jun 2009, 09:09:09 -0400 schrieb Carmel NY:
> > [...] It seems to work until I get to the copy part where it fails.
> >
> > My scripting skills are not that good. Perhaps someone could tell me
> > what I am doi
> $ find ./ -name "*.pem" -exec cp {} /usr/home/tmp/something \;
I'm a novice with shell scripting myself, but what's the difference
between that code and some variant thereof using a pipe and "xargs"?
Are they simply two different ways of achieving the same result? Or
is there some more importa
Hi Carmel
On Wed, Jun 17, 2009 at 8:39 AM, Carmel NY wrote:
> I am attempting to write a simple Bash script that will find all the
> '*.pem' files in a directory structure and move them to another
> directory. It seems to work until I get to the copy part where it fails.
>
Hi,
Am Dienstag, 16. Jun 2009, 09:09:09 -0400 schrieb Carmel NY:
> [...] It seems to work until I get to the copy part where it fails.
>
> My scripting skills are not that good. Perhaps someone could tell me
> what I am doing wrong.
>
> # copy the file to another directory using the base name
>
I am attempting to write a simple Bash script that will find all the
'*.pem' files in a directory structure and move them to another
directory. It seems to work until I get to the copy part where it fails.
My scripting skills are not that good. Perhaps someone could tell me
what I am d
. Let say I got line
admin 100
admin2 200
admin3 300
admin4 400
and then I want to echoing into screen:
admin has uid 100
admin2 has uid 200
admin3 has uid 300
admin4 has uid 400
How do I make this with bash script?
You don't really need bash for this.
Here's a sample awk s
admin4 400
>
> and then I want to echoing into screen:
>
> admin has uid 100
> admin2 has uid 200
> admin3 has uid 300
> admin4 has uid 400
>
> How do I make this with bash script?
You don't really need bash for this.
Here's a sample awk script that should work:
extract field username and UID from /etc/passwd and passed
into some scripts. Let say I got line
admin 100
admin2 200
admin3 300
admin4 400
and then I want to echoing into screen:
admin has uid 100
admin2 has uid 200
admin3 has uid 300
admin4 has uid 400
How do I make this with bash script?
Thank you
et say I got line
> >
> > admin 100
> > admin2 200
> > admin3 300
> > admin4 400
> >
> > and then I want to echoing into screen:
> >
> > admin has uid 100
> > admin2 has uid 200
> > admin3 has uid 300
> > admin4 has u
> and then I want to echoing into screen:
>
> admin has uid 100
> admin2 has uid 200
> admin3 has uid 300
> admin4 has uid 400
>
> How do I make this with bash script?
>
> Thank you
>
>
> Kalpin Erlangga Silaen
$ sed -e 's/\(admin[0-9]*\)\ \([0-9]*
hen I want to echoing into screen:
>
> admin has uid 100
> admin2 has uid 200
> admin3 has uid 300
> admin4 has uid 400
>
> How do I make this with bash script?
# echo $line |awk '{ print $1 " has uid " $2 }'
--
regards,
Artis
this with bash script?
Thank you
Kalpin Erlangga Silaen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
On 2007-12-17 06:00, Patrick Dung <[EMAIL PROTECTED]> wrote:
> I have correction with the script but still doesn't work:
>
> #!/usr/local/bin/bash
> for user in `ps -A -o user | sort | uniq | tail +2`
> do
> echo "user: $user"
>
>ps aux -U $user | tail +2 | while read line
>do
>
>
I have correction with the script but still doesn't work:
#!/usr/local/bin/bash
for user in `ps -A -o user | sort | uniq | tail +2`
do
echo "user: $user"
ps aux -U $user | tail +2 | while read line
do
mem=`echo $line | awk {'print $4'}`
echo "mem: $mem"
TMPSUMM
Hello, any idea about why below script is not working?
The final sum is empty..
#!/usr/local/bin/bash
for user in `ps -A -o user | sort | uniq | tail +2`
do
echo "user: $user"
ps aux -U $user | tail +2 | while read line
do
mem=`echo $line | awk {'print $4'}`
echo "mem
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of dw
> Sent: Tuesday, June 27, 2006 2:02 PM
> To: freebsd-questions@freebsd.org
> Subject: need help w/ simple bash script
>
> Hi all,
>
> I am trying to write a simple
Hiya.
I've been working on a web front-end to aggregate multiple servers'
package update requirements as well. I'll probably have it ready to
present in another few weeks, if ${DAYJOB} doesn't get in the way.
On Tue, Jun 27, 2006 at 08:01:49AM -0400, dw wrote:
>
> # REPORT=`pkg_version -v`
>
>
Hi all,
I am trying to write a simple bash script that will collate pkg_version
reports from all of my servers to generate centralized HTML reports. To
format the output, I am trying:
# REPORT=`pkg_version -v`
But when I "echo $REPORT", I get:
Xaw3d-1.5E_1 = up-to-date with por
[EMAIL PROTECTED] wrote:
My knowledge in bash scripting is about medium not very advanced and all
so I am not attempting to make a connection limiter but what I want to
make is a script that checks the irc connections off a certain user and
takes some actions, mostly of this I know how to do but
On Sat, 13 Aug 2005, Giorgos Keramidas wrote:
> On 2005-08-12 13:38, Benson Wong <[EMAIL PROTECTED]> wrote:
> > I prefer:
> >
> > for COREFILE in `find / -type f -name core -print`
> > do
> > ...
> > done
> >
> > Wouldn't that accomplish the same thing?
>
> More or less. Less, when
On 2005-08-12 13:38, Benson Wong <[EMAIL PROTECTED]> wrote:
> I prefer:
>
> for COREFILE in `find / -type f -name core -print`
> do
> ...
> done
>
> Wouldn't that accomplish the same thing?
More or less. Less, when the filenames are too many. See questions
posted on this very same list about `
I prefer:
for COREFILE in `find / -type f -name core -print`
do
...
done
Wouldn't that accomplish the same thing?
On 8/12/05, Ian Smith <[EMAIL PROTECTED]> wrote:
> On Fri 12 Aug 2005 09:33:54 +0800 Xu Qiang <[EMAIL PROTECTED]> wrote:
>
> > find / -type f -name core -print
On Fri 12 Aug 2005 09:33:54 +0800 Xu Qiang <[EMAIL PROTECTED]> wrote:
> find / -type f -name core -print | while read COREFILE ; do
> NCOREFILES=$[ $NCOREFILES + 1 ] # a bit strange - xq
> echo $NCOREFILES # xq
>
> N
dpk wrote:
> It will work with either 'let' or within an 'arithmetic expansion':
>
> $[++var]
> let ++var
>
> By the way, there is another syntax, from the man page, that seems to
> operate identically:
>
> $((++var)) and $((var+1))
With "let ++var", the result is still 0, it isn't incremented.
On Fri, 12 Aug 2005, Xu Qiang wrote:
> This is my test script:
>
> -
> #!/bin/bash
>
> var=0
> var=$[3]
>
> vari=0
> ++vari
>
> echo $var
> echo $vari
> -
>
> The result is:
> ./test.sh: ++vari: command not found
> 3
> 0
>
> So the manual of bash is incorrec
This is my test script:
-
#!/bin/bash
var=0
var=$[3]
vari=0
++vari
echo $var
echo $vari
-
The result is:
./test.sh: ++vari: command not found
3
0
So the manual of bash is incorrect?
Regards,
Xu Qiang
___
dpk wrote:
> On Fri, 12 Aug 2005, Xu Qiang wrote:
>> 1. The way of incrementing the variable NCOREFILES. Why does it use
>> the formula of "NCOREFILES=$[ $NCOREFILES + 1 ]", and not the direct
>> way of "NCOREFILES=$NCOREFILES+1"?
>
> If that was done, NCOREFILES would end up looking like:
>
> +1
Giorgos Keramidas wrote:
> On 2005-08-12 10:16, Xu Qiang <[EMAIL PROTECTED]> wrote:
>> Btw, can we "export" a value in the sub-shell back to the parent?
>
> Only through `backquote subtitution', as the child process cannot
> affect the environment of the parent process.
>
> value=`shell com
On 2005-08-12 10:16, Xu Qiang <[EMAIL PROTECTED]> wrote:
> Btw, can we "export" a value in the sub-shell back to the parent?
Only through `backquote subtitution', as the child process cannot affect
the environment of the parent process.
value=`shell command`
value=$(shell command)
dpk wrote:
> On Fri, 12 Aug 2005, Xu Qiang wrote:
> As soon as you used the pipe, to the while, you entered a sub-shell.
> There's no way (that I'm aware of anyways) to get the sub-shell's
> variables sent back up to the parent.
Thanks for your detailed analysis and a solution. Yes, I didn't notic
On Fri, 12 Aug 2005, Xu Qiang wrote:
> Hi, all:
>
> I don't know if this is the right list to ask this question. But since I
> didn't find a bash script mail list and you guys are always so helpful,
> then...
>
> Here
Hi, all:
I don't know if this is the right list to ask this question. But since I didn't
find a bash script mail list and you guys are always so helpful, then...
Here are an excerpt of a bash script:
---
#!/bin/bash
# saveLogs.s
My knowledge in bash scripting is about medium not very advanced and all
so I am not attempting to make a connection limiter but what I want to
make is a script that checks the irc connections off a certain user and
takes some actions, mostly of this I know how to do but I got stuck at
this :
I wri
Brian John wrote:
On 2005-03-23 12:29, Brian John <[EMAIL PROTECTED]> wrote:
Hello,
I am trying to write a simple bash script that will grep all files
in a directory (except ones that start with "00") for certain bad
keywords. Here is what I have so far:
#!/bin/bash
#
> On 2005-03-23 12:29, Brian John <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I am trying to write a simple bash script that will grep all files
> > in a directory (except ones that start with "00") for certain bad
> > keywords. Here is what I have so
On 2005-03-23 12:29, Brian John <[EMAIL PROTECTED]> wrote:
> Hello,
> I am trying to write a simple bash script that will grep all files
> in a directory (except ones that start with "00") for certain bad
> keywords. Here is what I have so far:
> #!/bin/bash
&
Hello,
I am trying to write a simple bash script that will grep all files in a
directory (except ones that start with "00") for certain bad keywords.
Here is what I have so far:
#!/bin/bash
# This is a simple script to check all sql scripts for bad keywords
BAD_KEYWORDS='sp
I just accidentily wiped one of my script folders. Really no big deal, I'm not
doing multiK scripts. But I had one nice script laying around. It created an
additional window in a named screen session and started a bittorrentheadless
session within.
I do remember that it took me some days to so
Got it going.
Instead of running daily_report from cron, I will now run the following:
-
#!/usr/local/bin/bash
# Time and run the Daily_report
\time -ho /root/tmp.time ~/bin/daily_report
cat /root/tmp.time | cut -f 2 | cut
OK, I've been playing with the time command to get the elapsed time of
my daily_report script reported in 2 decimal places.
If I do:
# \time -ha ~/daily.log ~/bin/daily_report (append output of time to
~/daily.log)
I get:
Time: /root/daily.log permission denied
(time output)
If I do:
# chmod 666
On Thu, Aug 14, 2003 at 12:23:34PM -0500, Stephen Hilton wrote:
> On Thu, 14 Aug 2003 12:11:55 -0500
> "Charles Howse" <[EMAIL PROTECTED]> wrote:
>
> > > Charles,
> > >
> > > This will set bc precision to 5 decimal places:
> > >
> > > et=`echo "scale=5 ; $end_time - $start_time" | bc`
> >
> > O
> > Can I refine it to give me something like: .784 seconds?
>
> Use "bc -l" instead of bc. That should do it.
No, that still gives 0 seconds.
I think this whole thing is dependent on the fact that `date +%s`
reports integers.
I'm still interested in something like .874 seconds, but for the ti
At 11:45 14.08.2003 -0500, Charles Howse wrote:
> > Can I refine it to give me something like: .784 seconds?
>
> Use "bc -l" instead of bc. That should do it.
No, that still gives 0 seconds.
I think this whole thing is dependent on the fact that `date +%s`
reports integers.
I'm still interested i
I received this msg a short time ago:
Antigen for Exchange found daily_report.sh matching =*.sh file filter.
The file is currently Removed. The message, "RE: Using bc in bash
script",
was
sent from Charles Howse and was discovered in IMC Queues\Inbound
located at mcglinchey/NewOr
At 11:35 14.08.2003 -0500, Kirk Strauser wrote:
At 2003-08-14T16:08:21Z, "Charles Howse" <[EMAIL PROTECTED]> writes:
> Can I refine it to give me something like: .784 seconds?
Use "bc -l" instead of bc. That should do it.
Yes, but not in the context mentioned before:
> > > Start_time=`date +%s`
Hello List,
I've migrated from Redhat Linux 9 to FreeBSD 4.8-RELEASE, character mode
- no gui.
I'm trying to calculate the number of seconds between $start_time and
$end_time in a bash script.
Start_time=`date +%s` # Seconds past midnight at start of script
[ do lots of stuff ]
End_
On Thu, Aug 14, 2003 at 10:46:45AM -0500, Charles Howse wrote:
> Hello List,
>
> I've migrated from Redhat Linux 9 to FreeBSD 4.8-RELEASE, character mode
> - no gui.
>
> I'm trying to calculate the number of seconds between $start_time and
> $end_time in a bash sc
t; character mode
> > > - no gui.
> > >
> > > I'm trying to calculate the number of seconds between
> > $start_time and
> > > $end_time in a bash script.
> > >
> > > Start_time=`date +%s` # Seconds past midnight at start of script
&g
> > The precision is in hundredths of a second as I understand it from
> > playing with time(!):
> >
> > #!/bin/sh
> > time_file=tmp.time
> > time="time -a -o $time_file"
> > $time cat /var/log/messages >/dev/null 2>&1
> > $time cat /var/log/maillog >/dev/null 2>&1
> > awk '{sum+=$1}END{print sum}
On Thu, 14 Aug 2003 18:34:25 +0100
Jez Hancock <[EMAIL PROTECTED]> wrote:
> On Thu, Aug 14, 2003 at 12:23:34PM -0500, Stephen Hilton wrote:
> > On Thu, 14 Aug 2003 12:11:55 -0500
> > "Charles Howse" <[EMAIL PROTECTED]> wrote:
> >
> > > > Charles,
> > > >
> > > > This will set bc precision to 5 d
1 - 100 of 113 matches
Mail list logo