Re: BASH scripting for a mouse

2003-06-14 Thread Cameron Simpson
On 10:55 13 Jun 2003, David Kramer <[EMAIL PROTECTED]> wrote: | On Friday 13 June 2003 04:40 am, Matthew Richards wrote: [...] | > but I do not know how to determine if the string "serial" exists in the | variable SMOUSE in terms of the 'if' statement. | | The answer is you don't. | | If you

Re: BASH scripting for a mouse

2003-06-13 Thread David Kramer
On Friday 13 June 2003 04:40 am, Matthew Richards wrote: > Hello, > > I am writing a script to determine if a serial mouse is connected to the local system. So far I have: > > #!/bin/bash > SMOUSE=$(/bin/grep -i "serial" /etc/sysconfig/mouse) > if [ $SMOUSE = "" ]; then >echo "There is not a

Re: BASH scripting for a mouse

2003-06-13 Thread Jon Haugsand
* Matthew Richards > Hello, > > I am writing a script to determine if a serial mouse is connected to the local > system. So far I have: > > #!/bin/bash > SMOUSE=$(/bin/grep -i "serial" /etc/sysconfig/mouse) > if [ $SMOUSE = "" ]; then >echo "There is not a serial mouse attached to this system.

BASH scripting for a mouse

2003-06-13 Thread Matthew Richards
Hello, I am writing a script to determine if a serial mouse is connected to the local system. So far I have: #!/bin/bash SMOUSE=$(/bin/grep -i "serial" /etc/sysconfig/mouse) if [ $SMOUSE = "" ]; then echo "There is not a serial mouse attached to this system." else echo "A serial mouse is a

RE: bash scripting newbie and security...

2002-11-15 Thread Patrick Nelson
Stone, Timothy wrote: - I'm writing down ideas for, and seeking help with, a bash script. This script will perform at least two SCP connections to Windoze boxes running an OpenSSH service (www.networksimplicity.com). I have some questions and I'm also concerned about how this sc

bash scripting newbie and security...

2002-11-15 Thread Stone, Timothy
List, I'm writing down ideas for, and seeking help with, a bash script. This script will perform at least two SCP connections to Windoze boxes running an OpenSSH service (www.networksimplicity.com). I have some questions and I'm also concerned about how this script should run, as root or as som

Re: bash scripting question

2002-10-26 Thread Steve Borho
On Wed, Oct 23, 2002 at 09:06:03PM -0500, christopher j bottaro wrote: > hello, > first off, are there any mailing lists where i can ask questions about bash > scripting? any good mailing list that deal with programming c in linux? > > anyways, i want to assign the exit status of

Re: bash scripting question

2002-10-24 Thread Andrew MacKenzie
> > You can't do that. Bash has a builtin variable ("$?") for holding the exit > > status, which you can then reassign to another variable if you need to > > store it for later use. For example: > > > > x=$? > > ok, but what if i want to capture the exit status of grep in the following > comm

Re: bash scripting question

2002-10-24 Thread Todd A. Jacobs
On Wed, 23 Oct 2002, christopher j bottaro wrote: > configure exited successfully, but also tee its output to a file and > grep it for any warnings about missing packages before i go on to > compile it. I think you're making it more complicated than it needs to be. You can create it as a series

Re: bash scripting question

2002-10-23 Thread christopher j bottaro
On Wednesday 23 October 2002 10:04 pm, Todd A. Jacobs wrote: > I spend a lot of time on the Moongroup shell.scripting list at: > > http://moongroup.com/mailman/listinfo/shell.scripting cool, i just joined that. > You can't do that. Bash has a builtin variable ("$?") for holding the exit > sta

Re: bash scripting question

2002-10-23 Thread Andrew MacKenzie
> hello, > first off, are there any mailing lists where i can ask questions about bash > scripting? any good mailing list that deal with programming c in linux? > > anyways, i want to assign the exit status of a command in a variable as an > integer. i tried the

Re: bash scripting question

2002-10-23 Thread Todd A. Jacobs
On Wed, 23 Oct 2002, christopher j bottaro wrote: > first off, are there any mailing lists where i can ask questions about > bash scripting? I spend a lot of time on the Moongroup shell.scripting list at: http://moongroup.com/mailman/listinfo/shell.scripting > anyways, i want

Re: bash scripting question

2002-10-23 Thread Roger
Around Wed,Oct 23 2002, at 09:06, christopher j bottaro, wrote: > hello, > first off, are there any mailing lists where i can ask questions about bash > scripting? any good mailing list that deal with programming c in linux? > > anyways, i want to assign the exit status of

Re: bash scripting question

2002-10-23 Thread Bret Hughes
On Wed, 2002-10-23 at 21:06, christopher j bottaro wrote: > hello, > first off, are there any mailing lists where i can ask questions about bash > scripting? moongroup.com shell-scripting list really low volume but some VERY sharp folks there. Several of which pop up on

RE: bash scripting question

2002-10-23 Thread Chad Skinner
> anyways, i want to assign the exit status of a command in a > variable as an > integer. i tried the following: > let x=`./configure --prefix=$1` > but it doesn't work. according to my book if ./configure --prefix = $1 then ... else ... fi -- redhat-list mailing list unsubscribe ma

bash scripting question

2002-10-23 Thread christopher j bottaro
hello, first off, are there any mailing lists where i can ask questions about bash scripting? any good mailing list that deal with programming c in linux? anyways, i want to assign the exit status of a command in a variable as an integer. i tried the following: let x=`./configure --prefix=$1

Re: Bash scripting

2002-06-06 Thread rpjday
On Thu, 6 Jun 2002, dbrett wrote: > What I did was for a similar thing was make a directory for each day. i.e > directories are 1,2,3,4,5 with 5 having the oldest information. I then > copied the contents of directory 4 to 5, 3 to 4 etc. By doing this I > did not have worry about deleting olde

Re: Bash scripting

2002-06-06 Thread dbrett
What I did was for a similar thing was make a directory for each day. i.e directories are 1,2,3,4,5 with 5 having the oldest information. I then copied the contents of directory 4 to 5, 3 to 4 etc. By doing this I did not have worry about deleting older files. The name of the files have to be

Re: Bash scripting

2002-06-06 Thread rpjday
On Thu, 6 Jun 2002, Cameron Simpson wrote: > On 23:15 05 Jun 2002, Jesse Angell <[EMAIL PROTECTED]> wrote: > | Here is my script > | #!/bin/sh > > Note - this isn't bash - it's generic Bourne shell - works in bash, ksh, etc. > Always a worthy goal. It merely happens that /bin/sh is bash on most

Re: Bash scripting

2002-06-05 Thread Cameron Simpson
On 00:40 06 Jun 2002, Jesse Angell <[EMAIL PROTECTED]> wrote: | When I tried: | find $root/$instance/psdata/backup/pserver.prefs -mtime + 5 -exec | rm {} ';' | It gave me the error: | find: invalid argument `+' to `-mtime' | | Whats wrong with it? [...] | From: "Cameron Simpson" <[EMAIL

Re: Bash scripting

2002-06-05 Thread Thierry ITTY
-mtime' > >Whats wrong with it? > >-- >Jesse Angell >PalaceUnlimited.com >#1 Palace Host >- Original Message - >From: "Cameron Simpson" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Wednesday, June 05, 2002 11:56 PM >Su

Re: Bash scripting

2002-06-05 Thread Jesse Angell
om: "Cameron Simpson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 11:56 PM Subject: Re: Bash scripting > On 23:15 05 Jun 2002, Jesse Angell <[EMAIL PROTECTED]> wrote: > | Here is my script > | #!/bin/sh > > Note - this i

Re: Bash scripting

2002-06-05 Thread Karl O . Pinc
On 2002.06.05 23:15 Jesse Angell wrote: > Here is my script > #!/bin/sh > > instance=${1:-palace} > root=${2:-/home/angeleyez/palaceserver} > cp $root/$instance/psdata/pserver.pat > $root/$instance/psdata/backup/pserver`date +%y%m%d`.pat > cp $root/$instance/psdata/pserver.prefs > $root/$instance

Re: Bash scripting

2002-06-05 Thread Cameron Simpson
On 23:15 05 Jun 2002, Jesse Angell <[EMAIL PROTECTED]> wrote: | Here is my script | #!/bin/sh Note - this isn't bash - it's generic Bourne shell - works in bash, ksh, etc. Always a worthy goal. It merely happens that /bin/sh is bash on most Linux systems. | cp $root/$instance/psdata/pserver.pref

Bash scripting

2002-06-05 Thread Jesse Angell
Here is my script #!/bin/sh   instance=${1:-palace}root=${2:-/home/angeleyez/palaceserver}cp $root/$instance/psdata/pserver.pat $root/$instance/psdata/backup/pserver`date +%y%m%d`.patcp $root/$instance/psdata/pserver.prefs $root/$instance/psdata/backup/pserver`date +%y%m%d`.prefs   This scrip

Re: [SOLVED] Re: Bash scripting and Filenames with spaces

2002-02-19 Thread Thierry ITTY
I find it more ...funny... written like this one line for each directory to exclude, no need to edit/change their names, just note the leading \ on the last one #!/bin/sh call="find $(echo '\ /mnt/dosc/windows /mnt/dosc/Program Files /mnt/dosc/rom_zips\ ' | while read line do echo "-path

[SOLVED] Re: Bash scripting and Filenames with spaces

2002-02-19 Thread kirk
Lynne, thanks for the info...your script produces what I need, except that my arguments are not on separate lines. However, I have managed to write the following script that allows "Program\_Files" to be passed as 'Program Files' to find. Especially important was the eval ($call) (also thanks to

Re: Bash scripting and Filenames with spaces

2002-02-18 Thread Cameron Simpson
On 21:32 18 Feb 2002, Lynne Lawrence <[EMAIL PROTECTED]> wrote: | eval $call It is better, generally, to write: eval "$call" In this instance it doesn't really matter because the words in $call will be split up on the whitespace and stuck back together with spaces, and will effectively

Re: Bash scripting and Filenames with spaces

2002-02-18 Thread Lynne Lawrence
Kirk, Try something like the following - this works for me. The set -x provides a "trace" and should be removed for actual use. #!/bin/sh set -x paths_to_exclude='/tmp/dir1/Program Files /tmp/fileobJEbT-rep-tarfh /tmp/orbit* /tmp/quickenw' call=`echo "$paths_to_exclude" | ( stuff= while re

Bash scripting and Filenames with spaces

2002-02-18 Thread kirk
I am trying to get a list of /mnt/dosc excluding "Program Files" and "quickenw" from within this script. This is a stripped down version of what would normally include variables, but it illustrates the concept. Here is the script: #!/bin/sh paths_to_exclude="/mnt/dosc/Program?Files /mnt/dosc/qu

Re: Bash scripting question

2000-11-13 Thread Charles Galpin
Hi Russ Use any one of your existing autoreply recipes (that I know you already have:) ) as a starting point. What you want to do is extract the address of the person to replay to, and execute your script. It's that easy. An UNTESTED guess would be :0: * ^To: send.qym.vet.pics { FROM=`formail

Re: Bash scripting question

2000-11-12 Thread Bret Hughes
[EMAIL PROTECTED] wrote: > On Sat, 11 Nov 2000, Marco Shaw wrote: > > Mutt will help you here: > > #>for each in `find . -name "*.jpg"` > > >do > > >mutt -a $each -s "your subject" to_address < /dev/null > > >done > > This will recursively go through the present working directory, and ema

Re: Bash scripting question

2000-11-12 Thread Marco Shaw
I'm going to think about this one... I don't think procmail is the correct route, and would think that sendmail and/or a listserv app like majordomo would be the better route. I know there's an app (custom?) that responds to commands when you specify them in the body of the email, but I don't kn

Re: Bash scripting question

2000-11-11 Thread Marco Shaw
Mutt will help you here: #>for each in `find . -name "*.jpg"` >do >mutt -a $each -s "your subject" to_address < /dev/null >done This will recursively go through the present working directory, and email all jpgs as attachments to the email address replacing 'to_address'. This will send them one-

RE: Bash scripting question

2000-11-11 Thread Mike Lewis
PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Bash scripting question I'd like something like this also. Please let me know if you find anything. Thanks. -- -Time flies like the wind. Fruit flies like a banana. Stranger things have - -happened but none stranger than this. Does your driver's l

Re: Bash scripting question

2000-11-11 Thread Steven W. Orr
I'd like something like this also. Please let me know if you find anything. Thanks. -- -Time flies like the wind. Fruit flies like a banana. Stranger things have - -happened but none stranger than this. Does your driver's license say Organ -Donor?Black holes are where God divided by zero. List