Re: Scripting question

2003-07-14 Thread Alexis Vasquez
--- Alexis Vasquez <[EMAIL PROTECTED]> escribió: > --- Ted Zlatanov <[EMAIL PROTECTED]> escribió: > On > Fri, 11 Jul 2003, [EMAIL PROTECTED] wrote: > > > I have a file with over 38000 lines in. Some of > > the lines have a > > > space at the beginning and I can delete those > > lines. Is there

Re: Scripting question

2003-07-14 Thread Alexis Vasquez
--- Ted Zlatanov <[EMAIL PROTECTED]> escribió: > On Fri, 11 Jul 2003, [EMAIL PROTECTED] wrote: > > I have a file with over 38000 lines in. Some of > the lines have a > > space at the beginning and I can delete those > lines. Is there a > > way using a script or vi that I can delete the > lines t

Re: Scripting question

2003-07-14 Thread Michael Martinez
On Fri, 2003-07-11 at 10:20, Ted Zlatanov wrote: > On Fri, 11 Jul 2003, [EMAIL PROTECTED] wrote: > > I have a file with over 38000 lines in. Some of the lines have a > > space at the beginning and I can delete those lines. Is there a > > way using a script or vi that I can delete the lines that b

Re: Scripting question

2003-07-13 Thread Mark Neidorff
On Fri, 11 Jul 2003, Leonard Miller wrote: > Thanks Alan, > That worked great. Now let me ask you this. > I have another file with blank lines - no space or tabs, just > carriage returns. > Can I use that same line to remove those blank lines? > > Leonard > No, becuase ther is no space to loo

Re: Scripting question

2003-07-12 Thread Alan Peery
Steven W. Orr wrote: I'm just curious. This is some sort of psychiatric deficiency or something. Why do *so* many people insist on cat fn | whatever when you can just say whatever < fn Probably from a strong bias to read from left to right, and the syntactic structure flows from this desi

Re: Scripting question

2003-07-12 Thread Jesse Keating
On Saturday 12 July 2003 05:34, Alan Peery wrote: > cat file | grep -v ^\$ > > This will keep only those lines NOT matching "^\$", a line where there > is nothing between the logical beginning and end of the line. If you > want to find lines that only have the letter q on them, > > cat fred | gre

Re: Scripting question

2003-07-12 Thread Steven W. Orr
On Saturday, Jul 12th 2003 at 13:34 +0100, quoth Alan Peery: =>Leonard Miller wrote: => =>>I have another file with blank lines - no space or tabs, just =>>carriage returns. =>>Can I use that same line to remove those blank lines? =>> =>> =>Use => =>cat file | grep -v ^\$ => =>This will keep o

Re: Scripting question

2003-07-12 Thread Alan Peery
Leonard Miller wrote: I have another file with blank lines - no space or tabs, just carriage returns. Can I use that same line to remove those blank lines? Use cat file | grep -v ^\$ This will keep only those lines NOT matching "^\$", a line where there is nothing between the logical begin

Re: Scripting question

2003-07-11 Thread Gordon Messmer
Leonard Miller wrote: [EMAIL PROTECTED] 07/11/03 09:38AM >>> cat file | grep -v ^\> file_nospace (that's a ^ followed by a \ followed by a space) mv file_nospace file > > Thanks Alan, > That worked great. Now let me ask you this. > I have another file with blank lines - no space or t

Re: Scripting question

2003-07-11 Thread Leonard Miller
Nevermind, I figured it out. Used a bracket expression cat in.txt | grep [01234567898] > out.txt Thanks for the help and the lesson Leonard >>> [EMAIL PROTECTED] 07/11/03 10:02AM >>> Thanks Alan, That worked great. Now let me ask you this. I have another file with blank lines - no space or tabs

RE: Scripting question

2003-07-11 Thread Hattie Rouge
lines. Dana Bourgeois > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Leonard Miller > Sent: Friday, July 11, 2003 6:16 AM > To: [EMAIL PROTECTED] > Subject: Scripting question > > > Hi, > I have a file with over 3800

Re: Scripting question

2003-07-11 Thread Ted Zlatanov
On Fri, 11 Jul 2003, [EMAIL PROTECTED] wrote: > I have a file with over 38000 lines in. Some of the lines have a > space at the beginning and I can delete those lines. Is there a > way using a script or vi that I can delete the lines that begin > with a space? If you mean just a space character

Re: Scripting question

2003-07-11 Thread Leonard Miller
Thanks Alan, That worked great. Now let me ask you this. I have another file with blank lines - no space or tabs, just carriage returns. Can I use that same line to remove those blank lines? Leonard >>> [EMAIL PROTECTED] 07/11/03 09:38AM >>> cat file | grep -v ^\> file_nospace (tha

Re: Scripting question

2003-07-11 Thread Alan Peery
cat file | grep -v ^\> file_nospace (that's a ^ followed by a \ followed by a space) mv file_nospace file Alan Leonard Miller wrote: Hi, I have a file with over 38000 lines in. Some of the lines have a space at the beginning and I can delete those lines. Is there a way using a scr

Scripting question

2003-07-11 Thread Leonard Miller
Hi, I have a file with over 38000 lines in. Some of the lines have a space at the beginning and I can delete those lines. Is there a way using a script or vi that I can delete the lines that begin with a space? Thanks L -- Psyche-list mailing list [EMAIL PROTECTED] https://www.redhat.com/mail

Re: Scripting Question

2003-01-11 Thread Thom Paine
---Original Message--- From: [EMAIL PROTECTED] Date: Saturday, January 11, 2003 3:43:38 PM To: [EMAIL PROTECTED] Subject: Re: Scripting Question On Saturday 11 January 2003 12:28, Thom Paine uttered: > That seems to have fixed that. > > How hard would it be to record th

Re: Scripting Question

2003-01-11 Thread Jesse Keating
On Saturday 11 January 2003 12:28, Thom Paine uttered: > That seems to have fixed that. > > How hard would it be to record the process and then kill it in a cron job? Extremely easy. The process variable does exactly that, it records the process ID. If you wanted to kill it, all you would have

Re: Scripting Question

2003-01-11 Thread Thom Paine
That seems to have fixed that. How hard would it be to record the process and then kill it in a cron job? Thanks. ---Original Message--- From: [EMAIL PROTECTED] Date: Saturday, January 11, 2003 3:11:59 PM To: [EMAIL PROTECTED] Subject: Re: Scripting Question On Saturday 11 January

Re: Scripting Question

2003-01-11 Thread Jesse Keating
On Saturday 11 January 2003 11:08, Thom Paine uttered: > Here is the output. Sorry it's not wrapped. But it is a dump of my server > while the quake3 server is running. > > It is process 6753. > > Thanks for your help. Try this: #!/bin/sh quake3dir="/usr/local/games/quake3" binname="q3ded" cd $

Re: Scripting Question

2003-01-11 Thread Jesse Keating
On Friday 10 January 2003 19:50, Thom Paine uttered: > I'd appreciate any input on this. At a later date to get fancier, I'd like > to record the pid so that I can kill it from cron too. I'd like to only > have the server running at night and I'd like to rotate through the > different servers on a

Re: Scripting Question

2003-01-11 Thread Thom Paine
0:00 /usr/bin/python -S /var/mailman/cron/gate_news root 6833 0.0 0.1 2788 824 pts/1R14:05 0:00 ps -auxwww ---Original Message--- From: [EMAIL PROTECTED] Date: Saturday, January 11, 2003 2:01:45 PM To: [EMAIL PROTECTED] Subject: Re: Scripting Question On Friday 10 Janu

Re: Scripting Question

2003-01-11 Thread Joe Klemmer
On Fri, 2003-01-10 at 22:50, Thom Paine wrote: > I have a scripting question I hope someone can answer and figure out for me. Side note: There's a very good list for scripting (shell, perl, etc.) available at http://moongroup.com/mailman/listinfo/shell.scripting where you can get all

Scripting Question

2003-01-10 Thread Thom Paine
Hello again all. I have a scripting question I hope someone can answer and figure out for me. I have finally built a full time game server at home running Psyche. I want to run several games on it, like Quake 3, Jedi Knight 2, Medal of Honor and a couple of others. I've been looking on th

RE: Shell Scripting Question.

2002-11-26 Thread Dan de Haan
I got it to work, thank you all for your suggestions. -Dan -Original Message- From: Michael Weber [mailto:[EMAIL PROTECTED]] Sent: November 26, 2002 12:11 PM To: [EMAIL PROTECTED] Subject: Re: Shell Scripting Question. find /path -ctime +2 -ok rm {} \; This will find all files

Re: Shell Scripting Question.

2002-11-26 Thread Justin Zygmont
try checking out the man page for find. It is the -mtime option if I remember correctly. On Tue, 26 Nov 2002, Dan de Haan wrote: > I have a simple shell script that runs from cron and makes a backup of some > filed to another PC via NFS. I want to have it automatically delete old > backups fo

RE: Shell Scripting Question.

2002-11-26 Thread Stephen Mah
To: [EMAIL PROTECTED] Subject: Shell Scripting Question. I have a simple shell script that runs from cron and makes a backup of some filed to another PC via NFS. I want to have it automatically delete old backups form the NFS server. How would I do that, is there a delete files older then N da

Re: Shell Scripting Question.

2002-11-26 Thread Randy Kelsoe
Dan de Haan wrote: I have a simple shell script that runs from cron and makes a backup of some filed to another PC via NFS. I want to have it automatically delete old backups form the NFS server. How would I do that, is there a delete files older then N days command? -Dan /usr/bin/find . -a

Re: Shell Scripting Question.

2002-11-26 Thread Michael Weber
find /path -ctime +2 -ok rm {} \; This will find all files starting with /path that have been changed more than 2 days ago and will prompt you for deleting them one by one. Get rid of the -ok if you KNOW it will delete only the files you want deleted. Change -ctime to -atime to find by access ti

Shell Scripting Question.

2002-11-26 Thread Dan de Haan
I have a simple shell script that runs from cron and makes a backup of some filed to another PC via NFS. I want to have it automatically delete old backups form the NFS server. How would I do that, is there a delete files older then N days command? -Dan -- Psyche-list mailing list [E