Re: Sendmail from Shell Script?

2003-09-19 Thread Dali Islam
In my opinion mutt command works better for sending mail with attatchment using shell script then sendmail. I tried to send attatchment using sendmail didn't work for me! mutt -s "test" -a /root/.bashrc [EMAIL PROTECTED] < /root/greetings --- Cameron Simpson <[EMAIL PR

Re: Sendmail from Shell Script?

2003-09-17 Thread Cameron Simpson
On 20:18 17 Sep 2003, David Hart <[EMAIL PROTECTED]> wrote: | On Wed, 2003-09-17 at 19:41, Rus Foster wrote: | > On Wed, 17 Sep 2003, David Hart wrote: | > > I seem to recall there's a way to send a file from a shell script but | > > cannot remember how to do it. | >

Re: Sendmail from Shell Script?

2003-09-17 Thread fred smith
On Wed, Sep 17, 2003 at 08:18:08PM -0400, David Hart wrote: > On Wed, 2003-09-17 at 19:41, Rus Foster wrote: > > On Wed, 17 Sep 2003, David Hart wrote: > > > > > I seem to recall there's a way to send a file from a shell script but > > > cannot remember how

Re: Sendmail from Shell Script?

2003-09-17 Thread Lists
I believe uuencode/decode are part of the sharutils RPM. - Paul On Wed, 2003-09-17 at 20:18, David Hart wrote: > On Wed, 2003-09-17 at 19:41, Rus Foster wrote: > > On Wed, 17 Sep 2003, David Hart wrote: > > > > > I seem to recall there's a way to send a file fro

Re: Sendmail from Shell Script?

2003-09-17 Thread David Hart
On Wed, 2003-09-17 at 19:41, Rus Foster wrote: > On Wed, 17 Sep 2003, David Hart wrote: > > > I seem to recall there's a way to send a file from a shell script but > > cannot remember how to do it. > > > > If its plain text then just > > cat filename |

Re: Sendmail from Shell Script?

2003-09-17 Thread Rus Foster
On Wed, 17 Sep 2003, David Hart wrote: > I seem to recall there's a way to send a file from a shell script but > cannot remember how to do it. > If its plain text then just cat filename | sendmail [EMAIL PROTECTED] else you want to look at uuencoding it then cat'ing

Sendmail from Shell Script?

2003-09-17 Thread David Hart
I seem to recall there's a way to send a file from a shell script but cannot remember how to do it. Help, please. -- Hart's PGP Key: 0x7BFF655E - http://TQMcube.com/ha

Re: need help with a shell script

2003-09-04 Thread Dave Ihnat
I see that you've found a solution to your original query. However, I'd just like to comment on a general script technique. Especially when executing programs with a security aspect, such as su, it's a very good idea to give the entire absolute path to the program, e.g., instead of just 'su', '/b

Re: need help with a shell script

2003-09-04 Thread steffen . grunewald
On Thu, Sep 04, 2003 at 11:25:27AM -0500, Dana Holland wrote: > [EMAIL PROTECTED] wrote: > > >Try to add an extra '-' after 'su' > > Thanks! That was it - works great now! Perhaps I should also explain why. Simply giving "su" a command to execute will run it in the environment of the calling pr

Re: need help with a shell script

2003-09-04 Thread Dana Holland
[EMAIL PROTECTED] wrote: Try to add an extra '-' after 'su' Thanks! That was it - works great now! There's also a deactivate option available... I saw that, but it didn't have enough info - does that simply prevent logging in? Would it affect the functioning of this vacation program in any wa

Re: need help with a shell script

2003-09-04 Thread Michael Gargiullo
On Thu, 2003-09-04 at 11:50, Dana Holland wrote: > I've written a shell script which will create a new user, then create a > .forward and .vacation.msg file in the new user's home directory. > Within this script, I'm trying to automate the initialization of the >

Re: need help with a shell script

2003-09-04 Thread steffen . grunewald
On Thu, Sep 04, 2003 at 10:50:22AM -0500, Dana Holland wrote: > I've written a shell script which will create a new user, then create a > .forward and .vacation.msg file in the new user's home directory. > Within this script, I'm trying to automate the initialization of

need help with a shell script

2003-09-04 Thread Dana Holland
I've written a shell script which will create a new user, then create a .forward and .vacation.msg file in the new user's home directory. Within this script, I'm trying to automate the initialization of the vacation program - that's where I'm running into problems. I&

RE: Shell Script Functionality

2003-08-28 Thread Bradley Caricofe
> I always found man find to be hard to glean usable information from but > info find does a pretty good job of explaining and gives some examples. Thanks very much! Very, very helpful... =) - Brad -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailma

RE: Shell Script Functionality

2003-08-28 Thread Bret Hughes
On Wed, 2003-08-27 at 20:14, Bradley Caricofe wrote: > > untested but should come close: > > > > find ~/.loki -name '*.dso'|xargs rm > > > > Assumption: > > > > file is run under the user's id otherwise the ~ will not substitute > > correctly. > > Bret and Sean, thanks very much! Within the .loki

RE: Shell Script Functionality

2003-08-28 Thread Bradley Caricofe
> untested but should come close: > > find ~/.loki -name '*.dso'|xargs rm > > Assumption: > > file is run under the user's id otherwise the ~ will not substitute > correctly. Bret and Sean, thanks very much! Within the .loki directory are about 20 subdirectories with these .dso files. Will this

Re: Shell Script Functionality

2003-08-27 Thread Bret Hughes
On Wed, 2003-08-27 at 17:04, Bradley Caricofe wrote: > I have a Tribes 2 server running on my RH 7.2 system and I have a simple > startup script that brings the game server up. The game creates a hidden > .loki folder in my users home directory which contains all of the game > settings. Within th

Re: Shell Script Functionality

2003-08-27 Thread Sean Estabrooks
On Wed, 27 Aug 2003 18:04:36 -0400 "Bradley Caricofe" <[EMAIL PROTECTED]> wrote: > I have a Tribes 2 server running on my RH 7.2 system and I have a simple > startup script that brings the game server up. The game creates a hidden > .loki folder in my users home directory which contains all of th

Shell Script Functionality

2003-08-27 Thread Bradley Caricofe
I have a Tribes 2 server running on my RH 7.2 system and I have a simple startup script that brings the game server up. The game creates a hidden .loki folder in my users home directory which contains all of the game settings. Within this folder are hundreds of .dso files that are compiled on gam

Re: Help with shell script

2003-08-01 Thread Anthony E. Greene
On 31-Jul-2003/11:02 -0500, Peram's List <[EMAIL PROTECTED]> wrote: >I'd appreciate if you can guide me/help me on a script on deleting >files/directories more than two days old on Redhat servers. man tmpwatch Tony -- Anthony E. Greene OpenPGP Key: 0x6C94239D/7B3D BD7D

Re: Help with shell script

2003-07-31 Thread Peram's List
Thanks for your help guys. I appreciate that. - Original Message - From: "Michael Gargiullo" <[EMAIL PROTECTED]> To: "redhat mailing list" <[EMAIL PROTECTED]> Sent: Thursday, July 31, 2003 11:10 AM Subject: Re: Help with shell script > Sure post what

Re: Help with shell script

2003-07-31 Thread James Gibbon
Michael Gargiullo wrote: > find / -mtime +2 -type d -exec rm -rf \{} \; > > I wonder how long that will run before it eats itself? Hasn't > anyone wanted to do that just to see... A system administrator colleague of mine did effectively exactly that, a few years ago, on a production Solaris ma

Re: Help with shell script

2003-07-31 Thread Jonathan Bartlett
> *Note: The above line is a joke, please don't run it on your system Ah! I seee. Long day. Jon > > -- > Michael Gargiullo <[EMAIL PROTECTED]> > Warp Drive Networks > > > -- > redhat-list mailing list > unsubscribe mailto:[EMAIL PROTECTED] > https://www.redhat.com/mailman/listinfo/redhat-list

Re: Help with shell script

2003-07-31 Thread Jonathan Bartlett
> find / -mtime +2 -type d -exec rm -rf \{} \; > > I wonder how long that will run before it eats itself? Hasn't anyone > wanted to do that just to see... > ;) I wouldn't do that, because the directory doesn't change if the file contents change. Jon > > *Note: The above line is a joke, please

Re: Help with shell script

2003-07-31 Thread Michael Gargiullo
On Thu, 2003-07-31 at 12:11, Jonathan Bartlett wrote: > > I'd appreciate if you can guide me/help me on a script on deleting > > files/directories more than two days old on Redhat servers. > > find WHATEVER -mtime +2 -type f -exec rm \{} \; > > substitute WHATEVER with the top-level directory yo

Re: Help with shell script

2003-07-31 Thread Jonathan Bartlett
> I'd appreciate if you can guide me/help me on a script on deleting files/directories > more than two days old on Redhat servers. find WHATEVER -mtime +2 -type f -exec rm \{} \; substitute WHATEVER with the top-level directory you want to purge on. Follow this with. find WHATEVER -mtime +2 -ty

Re: Help with shell script

2003-07-31 Thread Michael Gargiullo
Sure post what you have so far. On Thu, 2003-07-31 at 12:02, Peram's List wrote: > Hi all, > I'd appreciate if you can guide me/help me on a script on deleting > files/directories more than two days old on Redhat servers. > > Regards, > > Peram -- Michael Gargiullo <[EMAIL PROTECTED]> Warp Dr

Help with shell script

2003-07-31 Thread Peram's List
Hi all, I'd appreciate if you can guide me/help me on a script on deleting files/directories more than two days old on Redhat servers.   Regards,   Peram

Re: CLI - can you tell a shell script from a binary?

2003-07-27 Thread Dave Ihnat
On Sun, Jul 27, 2003 at 12:48:04PM -0300, josé toneh wrote: > Is there any way to tell a shell script from a > binary in the bash CLI? Nautilus sees that, so ls or > dir should too, no? The simplest way is to use the 'file' command. Pre-check with samples to make sure it&

Re: CLI - can you tell a shell script from a binary?

2003-07-27 Thread Jason Dixon
On Sun, 2003-07-27 at 11:48, josé toneh wrote: > Is there any way to tell a shell script from a > binary in the bash CLI? Nautilus sees that, so ls or > dir should too, no? Try the "file" command. [EMAIL PROTECTED] jason]$ file install-crossover-office-2.0.1.sh install-cro

CLI - can you tell a shell script from a binary?

2003-07-27 Thread josé toneh
Is there any way to tell a shell script from a binary in the bash CLI? Nautilus sees that, so ls or dir should too, no? Thanks -- jt ___ Conheça o novo Cadê? - Mais rápido, mais fácil e mais preciso. Toda a web, 42

RE: shell script - expert question

2003-03-17 Thread Kleiner Hampel
Thanks! Am Son, 2003-03-16 um 22.23 schrieb Robert P. J. Day: >... -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list

RE: shell script - expert question

2003-03-16 Thread Robert P. J. Day
On 16 Mar 2003, Kleiner Hampel wrote: > Hi, > > tricky! > > But what is about: > > ${var##string} > ${var%string} > ${var%%string} > > What means the double #, the single and double #? > Please explain me in some words! Thanks! > Is there a man page with this information? these are internal

RE: shell script - expert question

2003-03-16 Thread Kleiner Hampel
Hi, this results in the same error message! regards, hampel Am Son, 2003-03-16 um 18.20 schrieb Cowles, Steve: > > -Original Message- > > From: Kleiner Hampel > > Sent: Sunday, March 16, 2003 10:41 AM > > Subject: Re: shell script - expert question > >

RE: shell script - expert question

2003-03-16 Thread Kleiner Hampel
16 Mar 2003, Cowles, Steve wrote: > > > > -Original Message- > > > From: Kleiner Hampel > > > Sent: Sunday, March 16, 2003 10:41 AM > > > Subject: Re: shell script - expert question > > > > > > > > > Hi, > > >

Re: shell script - expert question

2003-03-16 Thread Kleiner Hampel
Thanks, this works! regards, hampel Am Son, 2003-03-16 um 18.23 schrieb Mikkel L. Ellertson: > On 16 Mar 2003, Kleiner Hampel wrote: > > > Hi, > > > > now it works, but because of the '*'. > > > > now i want to remove the leading abc from all files in my directory. > > i tried this: > > > > f

RE: shell script - expert question

2003-03-16 Thread Robert P. J. Day
On Sun, 16 Mar 2003, Cowles, Steve wrote: > > -Original Message- > > From: Kleiner Hampel > > Sent: Sunday, March 16, 2003 10:41 AM > > Subject: Re: shell script - expert question > > > > > > Hi, > > > > now it works, but because

Re: shell script - expert question

2003-03-16 Thread Mikkel L. Ellertson
On 16 Mar 2003, Kleiner Hampel wrote: > Hi, > > now it works, but because of the '*'. > > now i want to remove the leading abc from all files in my directory. > i tried this: > > for i in *; do mv $i `echo $i | sed s/abc//`; done > > but it doesn't do that. > i always get the error, that the l

RE: shell script - expert question

2003-03-16 Thread Cowles, Steve
> -Original Message- > From: Kleiner Hampel > Sent: Sunday, March 16, 2003 10:41 AM > Subject: Re: shell script - expert question > > > Hi, > > now it works, but because of the '*'. > > now i want to remove the leading abc from all files in

Re: shell script - expert question

2003-03-16 Thread Kleiner Hampel
rote: > > > Hi, > > > > i have a directory with some files with spaces in the name: > > > > abc 1.mp3 > > abc 2.mp3 > > abc 3 track 2.mp3 > > > > For my shell script i have to begin so: > > > > for i in `ls`; do echo $i; done > &

Re: shell script - expert question

2003-03-16 Thread Rus Foster
On Sun, 16 Mar 2003, Kleiner Hampel wrote: > Hi, > > i have a directory with some files with spaces in the name: > > abc 1.mp3 > abc 2.mp3 > abc 3 track 2.mp3 > > For my shell script i have to begin so: > > for i in `ls`; do echo $i; done > Try cd /tmp/foo f

shell script - expert question

2003-03-16 Thread Kleiner Hampel
Hi, i have a directory with some files with spaces in the name: abc 1.mp3 abc 2.mp3 abc 3 track 2.mp3 For my shell script i have to begin so: for i in `ls`; do echo $i; done the output results in: abc 1.mp3 abc 2.mp3 abc 3 track 2.mp3 But i want to get the same output as 'ls':

RE: a question about shell script

2003-03-14 Thread Terry Hobart
acobs Sent: Thursday, March 13, 2003 3:41 PM To: [EMAIL PROTECTED] Subject: Re: a question about shell script On Thu, 13 Mar 2003, Jihuang Zhou wrote: > Anybody knows how to get an input parameter list from the second > parameter to the second last? For example, if $*="aa bb cc

RE: a question about shell script

2003-03-13 Thread Cowles, Steve
> -Original Message- > From: Jihuang Zhou > Sent: Thursday, March 13, 2003 4:42 PM > Subject: a question about shell script > > > Hi list, > Anybody knows how to get an input parameter list from the second > parameter to the second last? > For example, if $

Re: a question about shell script

2003-03-13 Thread Todd A. Jacobs
On Thu, 13 Mar 2003, Jihuang Zhou wrote: > Anybody knows how to get an input parameter list from the second > parameter to the second last? For example, if $*="aa bb cc mm nn", Why not just shift away the first parameter? foo=$1 shift bar="$*" -- Guvf gntyvar jnf r

a question about shell script

2003-03-13 Thread Jihuang Zhou
Title: a question about shell script Hi list, Anybody knows how to get an input parameter list from the second parameter to the second last? For example, if $*="aa bb cc mm nn", I need the "bb ... mm". Here, the number n may change. Any commad like substr i

Re: HELP: Shell script (while) syntax

2003-02-05 Thread Todd A. Jacobs
On Tue, 4 Feb 2003 [EMAIL PROTECTED] wrote: > What I WANT to do is read lines from a list of data, and pass the lines > (individually) to another script. An easier method would be to use xargs: xargs -l1 echo < test.data -- "Of course I'm in shape! Round's a shape, isn't it?" -- r

Re: HELP: Shell script (while) syntax

2003-02-04 Thread Matthew Melvin
On Tue, 4 Feb 2003 at 11:53pm (-0700), [EMAIL PROTECTED] wrote: > OK, I SURE Ive done this before, but I cant quite get the > syntax right on this shell script. > > What I WANT to do is read lines from a list of data, and > pass the lines (individually) to another script. >

HELP: Shell script (while) syntax

2003-02-04 Thread clemens
OK, I SURE Ive done this before, but I cant quite get the syntax right on this shell script. What I WANT to do is read lines from a list of data, and pass the lines (individually) to another script. What Im trying (and I get syntax complaints) is test.sh < test.data where test.sh

Re: Shell Script Returned Value

2003-01-22 Thread Kevin - KD Micro Software
IL PROTECTED]> Sent: Tuesday, January 21, 2003 9:26 PM Subject: Re: Shell Script Returned Value > Kevin - KD Micro Software wrote: > > Hello everyone, > > > > I have a small programming question here, which I'm not sure if it's > > possible to do or not, but a

Re: Shell Script Returned Value

2003-01-21 Thread Mark Lundy
ehalf Of Kevin - KD Micro Software Sent: Monday, January 20, 2003 7:52 AM To: Redhat List Subject: Shell Script Returned Value Hello everyone, I have a small programming question here, which I'm not sure if it's possible to do or not, but any suggestions would be greatly appreciated.

RE: Shell Script Returned Value

2003-01-21 Thread Dan Bar Dov
> Sent: Monday, January 20, 2003 7:52 AM > To: Redhat List > Subject: Shell Script Returned Value > > Hello everyone, > > I have a small programming question here, which I'm not sure if it's > possible to do or not, but any suggestions would be greatly appreciat

Re: Shell Script Returned Value

2003-01-21 Thread Jan
Kevin - KD Micro Software wrote: Hello everyone, I have a small programming question here, which I'm not sure if it's possible to do or not, but any suggestions would be greatly appreciated. What I need is for the following to return with the appropriate exit status value ( $? ). Start Code

Shell Script Returned Value

2003-01-21 Thread Kevin - KD Micro Software
Hello everyone, I have a small programming question here, which I'm not sure if it's possible to do or not, but any suggestions would be greatly appreciated. What I need is for the following to return with the appropriate exit status value ( $? ). Start Code tar -cvzf $dev $dir 2>>$bac

Re: Simple (I'm sure) shell script problem

2003-01-14 Thread exits funnel
> `dos2unix ` to fix it. This fixed it! Thanks a lot. -exits > /B > - Original Message - > From: "exits funnel" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 14, 2003 17:17 > Subject: Simple (I'm sure) s

Re: Simple (I'm sure) shell script problem

2003-01-14 Thread irwin
On Tuesday 14 January 2003 05:17 pm, you wrote: ~ > I've cut the text from the follwing link: > > ftp://download1.nvidia.com/XFree86_40/1.0-4191/NVchooser.sh > > and pasted it into a file named NVchooser.sh and ftpd > it to a linux box running RedHat 7.2. There I did: > > chmod 777 NVc

Re: Simple (I'm sure) shell script problem

2003-01-14 Thread David Busby
January 14, 2003 17:17 Subject: Simple (I'm sure) shell script problem > Hello, > > Im sure I'm doing something really silly but I'm new > to Linux/Unix and I'm stuck trying to get this script > to run. > > I've cut the text from the follwing li

Simple (I'm sure) shell script problem

2003-01-14 Thread exits funnel
Hello, Im sure I'm doing something really silly but I'm new to Linux/Unix and I'm stuck trying to get this script to run. I've cut the text from the follwing link: ftp://download1.nvidia.com/XFree86_40/1.0-4191/NVchooser.sh and pasted it into a file named NVchooser.sh and ftpd it to a linux box

Re: HOWTO : protect a shell script?

2003-01-08 Thread jkinz
On Wed, Jan 08, 2003 at 05:25:21AM -0800, Burke, Thomas G. wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Here's a little C program I wrote once... Try compiling & running > it. You might need to add a "sytem("cd what/ever/directory")", or This change of directory would only affec

RE: HOWTO : protect a shell script?

2003-01-08 Thread Burke, Thomas G.
d main(int noargs, char *args[]) { int i; for(i=1 ; imailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 11:46 PM To: [EMAIL PROTECTED] Subject: Re: HOWTO : protect a shell script? On Tue, Jan 07, 2003 at 05:32:08PM -0800, Todd A. Jacobs wrote: > On Tue, 7 Jan 2003, Burke

Re: HOWTO : protect a shell script?

2003-01-07 Thread jkinz
gt; > Can't be done directly. A shell script *must* be readable (and *can* be > executable), since it's interpreted by the shell. > > If you absolutely must do this, though, you can create a wrapper script > that's SUID to an account with permissions to run the "

RE: HOWTO : protect a shell script?

2003-01-07 Thread Todd A. Jacobs
On Tue, 7 Jan 2003, Burke, Thomas G. wrote: > I have some script shell (belong to root). I would like it to be > executable by every users but i don't want it to be readable by others > users. Can't be done directly. A shell script *must* be readable (and *can* be exec

Re: HOWTO : protect a shell script?

2003-01-07 Thread jkinz
on Tue, Jan 07, 2003 at 05:36:45PM +0100, cana rich wrote: > > Hello, > I am using Linux RedHat 7.2. > I have some script shell (belong to root). I would like it to be executable by every >users but i don't want it to be readable by others users. > Is it possible? > Thanks for your help > Cana

RE: HOWTO : protect a shell script?

2003-01-07 Thread Burke, Thomas G.
Title: RE: HOWTO : protect a shell script? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 chmod 711?  Just a thought, never tried it... - -Original Message- From: cana rich [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 11:37 AM To: [EMAIL PROTECTED] Subject: HOWTO

HOWTO : protect a shell script?

2003-01-07 Thread cana rich
Hello,     I am using Linux RedHat 7.2. I have some script shell (belong to root). I would like it to be executable by every users but i don't want it to be readable by others users. Is it possible? Thanks for your help CanarichDo You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Teste

Re: Need Shell Script Tutorial Document.

2002-12-19 Thread Jonathan Bartlett
rute.sourceforge.net On Thu, 19 Dec 2002, Santhosh wrote: > All, > Can you tell me tutorials for Shell Scripts. > > Thanx in Advance > > Santhosh. > > > > -- > redhat-list mailing list > unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe > https://listman.redhat.com/mailman/listinfo/r

Re: Need Shell Script Tutorial Document.

2002-12-19 Thread Nick Lindsell
At 22:15 19/12/2002 +0500, you wrote: All, Can you tell me tutorials for Shell Scripts. Thanx in Advance Santhosh. http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html http://www.tldp.org/LDP/abs/html/ hih nick@nexnix -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECT

Re: Need Shell Script Tutorial Document.

2002-12-19 Thread Josep M.
Hello. Look at: http://www.tldp.org/guides.html Advanced Bash-Scripting Guide version: 1.6 author: Mendel Cooper, <[EMAIL PROTECTED]> last update: September 2002 available formats: HTML (read online) HTML (tarred and gzipped package, 329k) PDF (957k) other : plain text, PDF, PostScript

Re: Need Shell Script Tutorial Document.

2002-12-19 Thread Anthony E. Greene
On 19-Dec-2002/22:15 +0500, Santhosh <[EMAIL PROTECTED]> wrote: > Can you tell me tutorials for Shell Scripts. BASH Programming - Introduction HOW-TO http://en.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html Advanced Bash-Scripting Guide http://en.tldp.org/LDP/abs/html/ Linux Gazette - Intro

Re: Need Shell Script Tutorial Document.

2002-12-19 Thread Mertens Bram
On Thu, 2002-12-19 at 17:15, Santhosh wrote: > All, > Can you tell me tutorials for Shell Scripts. Try http://www.linuxcommand.org It has a very nice tutorial and links to other sites with tutorials and example scripts... Plus there's a great mailing list connected to the site as wall. HT

Need Shell Script Tutorial Document.

2002-12-19 Thread Santhosh
All, Can you tell me tutorials for Shell Scripts. Thanx in Advance Santhosh. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list

Bash Shell Script Complier

2002-11-26 Thread Kevin - KD Micro Software
Hello all, I'm just wondering if any of you know of any "compilers" for shell scripts. I've been using Francisco Rosales' one ( http://www.datsi.fi.upm.es/~frosal/frosal.html ) for quite some time, but it appears to have issues with Red Hat 8.0 so I'm looking for alternatives. If anyone knows of

Re: Shell Script Question || Check for set variable

2002-11-06 Thread Hella
There are several options but this one will work (Assuming bash or sh): if [ "$2" == "" ]; then Also, here is a very handy guide I use for those quick lookups when you get rusty. It is avail. in PDF and HTML. http://personal.riverusers.com/~thegrendel/abs-guide-1.6.tar.bz2 -Chuck MET wrote

RE: Shell Script Question || Check for set variable

2002-11-05 Thread MET
Thanks a lot that worked =) ~ Matthew -Original Message- From: [EMAIL PROTECTED] [mailto:redhat-list-admin@;redhat.com] On Behalf Of Cowles, Steve Sent: Tuesday, November 05, 2002 10:49 PM To: '[EMAIL PROTECTED]' Subject: RE: Shell Script Question || Check for se

RE: Shell Script Question || Check for set variable

2002-11-05 Thread Cowles, Steve
> -Original Message- > From: MET > Subject: Re: Shell Script Question || Check for set variable > > > I've tried what follows and I still get " if: Expression Syntax ". > > > #!/bin/tcsh > > if [ -z "$2" ]

Re: Shell Script Question || Check for set variable

2002-11-05 Thread MET
I've tried what follows and I still get " if: Expression Syntax ". #!/bin/tcsh if [ -z "$2" ] ; then echo You have not set a file to be appended. exit 1 fi Any ideas? ~ MET On Tuesday 05 November 2002 7:35 pm, Todd A. Jacobs wro

Re: Shell Script Question || Check for set variable

2002-11-05 Thread Todd A. Jacobs
On Tue, 5 Nov 2002, MET wrote: > if ( ! $2 ) then > echo You must set a second file > exit 1 > fi Start by reading the bash manual at: http://www.gnu.org/manual/bash-2.05a/bashref.html But you can do a test expression like: if [[ -z $2 ]]

Re: Shell Script Question || Check for set variable

2002-11-05 Thread David Kramer
On Tuesday 05 November 2002 06:54 pm, Hal Burgiss wrote: > On Tue, Nov 05, 2002 at 06:46:29PM -0500, MET wrote: > > Simply put, I'm trying to check if $2 is set. Any ideas? > > > > if ( ! $2 ) then > > echo You must set a second file > > exit 1 > > fi > > > > The ab

Re: Shell Script Question || Check for set variable

2002-11-05 Thread Hal Burgiss
On Tue, Nov 05, 2002 at 06:46:29PM -0500, MET wrote: > Simply put, I'm trying to check if $2 is set. Any ideas? > > if ( ! $2 ) then > echo You must set a second file > exit 1 > fi > > The above doesn't work reporting if expression error. Any help would b

Shell Script Question || Check for set variable

2002-11-05 Thread MET
Simply put, I'm trying to check if $2 is set. Any ideas? if ( ! $2 ) then echo You must set a second file exit 1 fi The above doesn't work reporting if expression error. Any help would be greatly appreciated. Thanks in advance, ~ MET -- redh

gcc stopped working from the command line but works from a shell script!!

2002-09-23 Thread Bruno Negrao
piler error in function execute      The strange thing is: if I make a shell script containing the line  gcc progzz.c -o progzz and I `chmod +x scriptfile` and execute it, the gcc works!!    The contents of the c program "progzz.c" is: #include main (){    int i =2;    printf (&qu

Re: shell script

2002-09-12 Thread Todd A. Jacobs
On Tue, 10 Sep 2002, Steven W. Orr wrote: > tty_type=$(tty) > if [[ ${tty_type%/*} = /dev/pts ]] > then > TERM=vt100 > else > TERM=scoansi > fi Note that this will not catch instances inside of an xterm, since xterms are assigned on a pts and not a pty. You may also want to test $SHLVL

RE: shell script

2002-09-11 Thread David Freeman
> need to assign the TERM variable depending on if user > is on console TERM=scoansi, but if it's on terminal > 'pts/#' then TERM=vt100.. > In .bash_profile I saw this. > if tty-type in 'tty[1,2,#]' ; then > TERM=scoansi > else > TERM=vt100 > fi Did you 'EXPORT TERM'? AFAIK you ne

shell script

2002-09-11 Thread alexis Vasquez
need to assign the TERM variable depending on if user is on console TERM=scoansi, but if it's on terminal 'pts/#' then TERM=vt100.. In .bash_profile I saw this. if [ -f ~/.bashrc ]; then . ~/.bashrc fi so I did get the value for command 'tty' "Don't know how to do this" to the variabl

Re: shell script

2002-09-10 Thread Steven W. Orr
On Tue, 10 Sep 2002, alexis Vasquez wrote: =>need to assign the TERM variable depending on if user =>is on console TERM=scoansi, but if it's on terminal =>'pts/#' then TERM=vt100.. =>In .bash_profile I saw this. => =>if [ -f ~/.bashrc ]; then =>. ~/.bashrc =>fi => =>so I did =>get the

How to: write a shell script to change host name on command line.

2002-08-10 Thread truc nguyen
Hi First, I'd like to thank you to take the time to answer my question. How do I write a shell script named chHostName to change the hostname from Venus to Mar ( from the file /etc/sysconfig/network) ? So that when I type the command line #chHostName Venus Mar It will change the line hos

Re: Shell Script...more

2002-07-27 Thread Todd A. Jacobs
On Sat, 27 Jul 2002, Robert P. J. Day wrote: > id: cannot print only names or real IDs in default format () id -run && id -ur -- "The only thing that helps me maintain my slender grip on reality is the friendship I share with my collection of singing potatoes."

Re: Shell Script...more

2002-07-27 Thread C. Linus Hicks
On Sat, 2002-07-27 at 11:15, Brian Ashe wrote: > Robert P. J. Day, > > On Saturday July 27, 2002 05:17, you said something about: > > On Sat, 27 Jul 2002, Anthony E. Greene wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > On 26-Jul-2002/05:50 -0400, "Robert P. J. Day"

Re: Shell Script...more

2002-07-27 Thread Robert P. J. Day
On Sat, 27 Jul 2002, Brian Ashe wrote: > But to answer your original question... > > You could use the "logname" command to do a comparison like so... sadly, "logname" under limbo also seems to be broken. sigh. rday Robert P. J. Day, RHCE, RHCI Eno River Technologies, Chapel Hill NC Unix, Li

Re: Shell Script...more

2002-07-27 Thread Brian Ashe
Robert P. J. Day, On Saturday July 27, 2002 05:17, you said something about: > On Sat, 27 Jul 2002, Anthony E. Greene wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On 26-Jul-2002/05:50 -0400, "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: > > >while i'm thinking about it, i

Re: Shell Script...more

2002-07-27 Thread Robert P. J. Day
On Sat, 27 Jul 2002, Anthony E. Greene wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 26-Jul-2002/05:50 -0400, "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: > >while i'm thinking about it, is there a way to get both > >the real and effective user names/UIDs? in case someone > >

Re: Shell Script...more

2002-07-26 Thread Anthony E. Greene
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 26-Jul-2002/05:50 -0400, "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: >while i'm thinking about it, is there a way to get both >the real and effective user names/UIDs? in case someone >has "su"ed to root, is there a way to see the original >login

RE: Shell Script...more

2002-07-26 Thread Todd A. Jacobs
On Fri, 26 Jul 2002, Robert P. J. Day wrote: > while i'm thinking about it, is there a way to get both > the real and effective user names/UIDs? in case someone id -r -- "The only thing that helps me maintain my slender grip on reality is the friendship I share with my collection of singing p

RE: Shell Script...more

2002-07-26 Thread Stephen_Reilly
use whoami or more specifically "VarName=`whoami`" steve > -Original Message- > From: Matthew Melvin [mailto:[EMAIL PROTECTED]] > Sent: 26 July 2002 03:35 > To: [EMAIL PROTECTED] > Subject: Re: Shell Script...more > > > On Thu, 25 Jul 2002 at

Shell Script...more

2002-07-25 Thread Jesse Angell
Hey, I need to ask more questions, who would of thought.. Is there any way with a shell script to see what user it's being run as and include that as a variable So let's say.. the user: john runs it.. to have it in the script check and see what user is running it, and then assigning

Re: Shell Script

2002-07-25 Thread Jesse Angell
That tmpwatch that Robert suggested worked great.. I'll stick with that. - Original Message - From: "Randy Weidman" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Thursday, July 25, 2002 8:19 PM Subject: Re: Shell Script

Re: Shell Script

2002-07-25 Thread Robert P. J. Day
On Thu, 25 Jul 2002, Jesse Angell wrote: > I need to make a shell script to look in > /home/$user/palaceserver/palace/psdata/backup > and in that folder delete all the files that are 7 day's old.. > Could someone help me out with this? $ m

Shell Script

2002-07-25 Thread Jesse Angell
I need to make a shell script to look in /home/$user/palaceserver/palace/psdata/backup and in that folder delete all the files that are 7 day's old.. Could someone help me out with this? -- Jesse Angell PalaceUnlimited.com #1 Palace

Re: [REDHAT] Re: Shell Script

2002-06-22 Thread David Kramer
On Fri, 21 Jun 2002, Jesse Angell wrote: > I couldn't get them to work I emailed asking more about it, never a reply.. I remember a post asking how you specify the input and output files, which I answered. If you're referring to a different question I must have missed it. Please repost your

Re: Shell Script

2002-06-21 Thread Jesse Angell
I couldn't get them to work I emailed asking more about it, never a reply.. - Original Message - From: "David Kramer" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Friday, June 21, 2002 4:29 PM Subject: Re: Shell Script >

  1   2   >