Re: [CentOS] script question

2011-03-31 Thread Emmett Culley
On 03/31/2011 05:25 AM, Jerry Geis wrote: > I can do "simply" search and replace with sed. > However, I want to setup httpd.conf from a script > that changes the default "/" which is presently: > > > Options FollowSymLinks > AllowOverride None > > > and change it to the following: >

Re: [CentOS] script question

2011-03-31 Thread Bill Campbell
On Thu, Mar 31, 2011, Jerry Geis wrote: >I can do "simply" search and replace with sed. >However, I want to setup httpd.conf from a script >that changes the default "/" which is presently: While this can be done with sed, it's generally a lot easier to do with python or perl, particularly when dea

[CentOS] script question

2011-03-31 Thread Jerry Geis
I can do "simply" search and replace with sed. However, I want to setup httpd.conf from a script that changes the default "/" which is presently: Options FollowSymLinks AllowOverride None and change it to the following: Order Deny,Allow Deny from all AllowOverride None H

Re: [CentOS] script question

2010-06-11 Thread Brunner, Brian T.
> -Original Message- > From: centos-boun...@centos.org > [mailto:centos-boun...@centos.org] On Behalf Of John Doe > Sent: Friday, June 11, 2010 10:50 AM > To: CentOS mailing list > Subject: Re: [CentOS] script question > > From: "m.r...@5-cent.us"

Re: [CentOS] script question

2010-06-11 Thread John Doe
From: "m.r...@5-cent.us" >> On Fri, Jun 11, 2010 at 10:04 AM, Jerry Geis < >> if I do: echo jj_$VERSION_jj >> I get jj_ >> How do I get the $VERSION to work with the >> underscores like the dashes > echo \_$VERSION\_ Or:echo jj_${VERSION}_jj JD _

Re: [CentOS] script question

2010-06-11 Thread m . roth
> On Fri, Jun 11, 2010 at 10:04 AM, Jerry Geis > wrote: >> in a script if I have: >> VERSION="3.2.0" >> >> I can do: >> echo jj-$VERSION-jj >> and get jj-3.2.0-jj >> >> however if I do: >> echo jj_$VERSION_jj >> I get jj_ >> >> How do I get the $VERSION to work with the underscores like the dashes

Re: [CentOS] script question

2010-06-11 Thread Bob Beers
On Fri, Jun 11, 2010 at 10:04 AM, Jerry Geis wrote: > Hi all, > > > in a script if I have: > VERSION="3.2.0" > > I can do: > echo jj-$VERSION-jj > and get jj-3.2.0-jj > > however if I do: > echo jj_$VERSION_jj > I get jj_ > > How do I get the $VERSION to work with the underscores like the dashes d

Re: [CentOS] script question

2010-06-11 Thread Brunner, Brian T.
> > How do I get the $VERSION to work with the underscores like > the dashes do. echo JJ\_$VERSION\_JJ *** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity t

Re: [CentOS] script question

2010-06-11 Thread Christoph Neuhaus
> however if I do: > echo jj_$VERSION_jj > I get jj_ > > How do I get the $VERSION to work with the underscores like the dashes > do. echo jj_${VERSION}_jj ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos

Re: [CentOS] script question

2010-06-11 Thread Kwan Lowe
On Fri, Jun 11, 2010 at 10:04 AM, Jerry Geis wrote: > Hi all, > > > in a script if I have: > VERSION="3.2.0" > > I can do: > echo jj-$VERSION-jj > and get jj-3.2.0-jj > > however if I do: > echo jj_$VERSION_jj > I get jj_ > > How do I get the $VERSION to work with the underscores like the dashes

[CentOS] script question

2010-06-11 Thread Jerry Geis
Hi all, in a script if I have: VERSION="3.2.0" I can do: echo jj-$VERSION-jj and get jj-3.2.0-jj however if I do: echo jj_$VERSION_jj I get jj_ How do I get the $VERSION to work with the underscores like the dashes do. Thanks, Jerry ___ CentOS mail

Re: [CentOS] script question

2009-06-04 Thread Jacques B.
On Thu, Jun 4, 2009 at 10:27 AM, Stephen Harris wrote: > On Thu, Jun 04, 2009 at 10:11:37AM -0400, Jacques B. wrote: > >> head -n 188 your_script | tail -n 3 > >> That will output lines 186-188 so that you have some context (in case > > sed -n 186,188p your_script > > :-) > > -- > > rgds > Stephen

Re: [CentOS] script question

2009-06-04 Thread Stephen Harris
On Thu, Jun 04, 2009 at 10:11:37AM -0400, Jacques B. wrote: > head -n 188 your_script | tail -n 3 > That will output lines 186-188 so that you have some context (in case sed -n 186,188p your_script :-) -- rgds Stephen ___ CentOS mailing list CentOS

Re: [CentOS] script question

2009-06-04 Thread Jacques B.
On Thu, Jun 4, 2009 at 9:47 AM, Jerry Geis wrote: > I have this line: >             ALSA=`aplay --version` > > in a script. when I execute the script I get the message >  line 187: --version: command not found > > when I do "aplay --version" on the command line it works just fine. > > What is happe

Re: [CentOS] script question

2009-06-04 Thread Christoph Neuhaus
> I have this line: > ALSA=`aplay --version` > > in a script. when I execute the script I get the message > line 187: --version: command not found What's in line 187? Do you really want to use backticks ` or should it be more like ALSA='aplay --version' (apostrophes)? If you want

Re: [CentOS] script question

2009-06-04 Thread Pintér Tibor
Jerry Geis wrote: > I have this line: > ALSA=`aplay --version` > > in a script. when I execute the script I get the message > line 187: --version: command not found > $ echo $(aplay --version) aplay: version 1.0.18 by Jaroslav Kysela t

[CentOS] script question

2009-06-04 Thread Jerry Geis
I have this line: ALSA=`aplay --version` in a script. when I execute the script I get the message line 187: --version: command not found when I do "aplay --version" on the command line it works just fine. What is happening here, --version is a valid command line option? Thanks, j

Re: [CentOS] script question

2008-10-15 Thread nate
Jerry Geis wrote: > Hi all, > > I am trying to create a script that takes an entire file, > drops the first 19 characters from each line and creates a new file. [..] > test.txt is below > 10-Oct-08 08:14 am 10 If this is the format of your data you could use awk to do the same thing cat filename

Re: [CentOS] script question

2008-10-15 Thread Les Mikesell
Filipe Brandenburger wrote: Hi, On Wed, Oct 15, 2008 at 10:48, Jerry Geis <[EMAIL PROTECTED]> wrote: I am trying to create a script that takes an entire file, drops the first 19 characters from each line and creates a new file. newline=`echo $LINE | cut -f 19-` What you want is "cut -c

Re: [CentOS] script question

2008-10-15 Thread Filipe Brandenburger
Hi, On Wed, Oct 15, 2008 at 10:48, Jerry Geis <[EMAIL PROTECTED]> wrote: > I am trying to create a script that takes an entire file, > drops the first 19 characters from each line and creates a new file. > newline=`echo $LINE | cut -f 19-` What you want is "cut -c 19-" (-c as in characters)

Re: [CentOS] script question

2008-10-15 Thread Bo Lynch
On Wed, October 15, 2008 10:48 am, Jerry Geis wrote: > Hi all, > > I am trying to create a script that takes an entire file, > drops the first 19 characters from each line and creates a new file. > > I am missing something easy but I am not seeing it. > > Jerry > > --- > I tried the script below bu

Re: [CentOS] script question

2008-10-15 Thread Tim Nelson
Hello Jerry- Simply change the line: newline=`echo $LINE | cut -f 19-` to this: newline=`echo $LINE | cut -c 19-` You want to cut based on 'c'haracters, not 'f'ields. :-) Tim Nelson Systems/Network Support Rockbochs Inc. (218)727-4332 x105 - "Jerry Geis" <[EMAIL PROTEC

Re: [CentOS] script question

2008-10-15 Thread Pintér Tibor
I am trying to create a script that takes an entire file, drops the first 19 characters from each line and creates a new file. I am missing something easy but I am not seeing it. Jerry --- I tried the script below but did not work. rm output.txt cat test.txt | \ while read LINE do ne

[CentOS] script question

2008-10-15 Thread Jerry Geis
Hi all, I am trying to create a script that takes an entire file, drops the first 19 characters from each line and creates a new file. I am missing something easy but I am not seeing it. Jerry --- I tried the script below but did not work. rm output.txt cat test.txt | \ while read LINE do