Re: Module systems for bash?

2008-08-29 Thread Maximillian Murphy
Dear Jon, I seem to remember that bash does have a path that it checks for function definitions but a quick search didn't turn it up. Google is not the best way to go because it returns far too many hits. Looking at the bash source code is probably quickest. I can't remember how it works -

Re: Module systems for bash?

2008-08-29 Thread Pierre Gaston
On Sun, Aug 24, 2008 at 10:16 AM, Jon Seymour <[EMAIL PROTECTED]> wrote: > Forgive me if there is a more appropriate forum for discussing this > topic, but it wasn't obvious from a cursory glance at the web pages > that there was one. > > I was wondering if anyone has ever developed a module system

Interesting problem writing bash script to execute commands from SQL

2008-08-29 Thread juliodm
I'm writing a bash script to that will execute commands from a database. What I mean is that the MySQL database contains commands that bash will pull and then run itself. My problem is that some of the commands contain single quotes, as needed by the shell app it plans to run. When I write a line

Re: Interesting problem writing bash script to execute commands from SQL

2008-08-29 Thread Pierre Gaston
On Thu, Aug 28, 2008 at 8:25 PM, juliodm <[EMAIL PROTECTED]> wrote: > > I'm writing a bash script to that will execute commands from a database. > What I mean is that the MySQL database contains commands that bash will pull > and then run itself. > > My problem is that some of the commands contain

How does the input-line test work?

2008-08-29 Thread Hector Chu
input-line.sh is: bash ./input-line.sub this line for input-line.sub with input-line.sub being: read line echo line read by $0 was \`$line\' The test is run by executing: bash < input-line.sh. How does input-line.sub manage to read from the correct point in the input file? Doesn't the parent b

Re: How does the input-line test work?

2008-08-29 Thread Chet Ramey
Hector Chu wrote: input-line.sh is: bash ./input-line.sub this line for input-line.sub with input-line.sub being: read line echo line read by $0 was \`$line\' The test is run by executing: bash < input-line.sh. How does input-line.sub manage to read from the correct point in the input file?

how do I write a shell script to batch rename files in a directory?

2008-08-29 Thread Tony Zanella
Hello all, I have a directory listing of files like: img.bc03.547.1.gif? I need to trim the last character off for each file in the dir. I know I can use: mv img.bc03.547.1.gif? img.bc03.547.1.gif to rename each by hand, but I want to do this as a batch. I know it would start with: for files in *;

Re: how do I write a shell script to batch rename files in a directory?

2008-08-29 Thread Bob Proulx
Tony Zanella wrote: > I have a directory listing of files like: > img.bc03.547.1.gif? > I need to trim the last character off for each file in the dir. > I know I can use: > mv img.bc03.547.1.gif? img.bc03.547.1.gif > to rename each by hand, but I want to do this as a batch. > I know it would start

Re: how do I write a shell script to batch rename files in a directory?

2008-08-29 Thread Chris F.A. Johnson
On 2008-08-29, Bob Proulx wrote: > Tony Zanella wrote: >> I have a directory listing of files like: >> img.bc03.547.1.gif? >> I need to trim the last character off for each file in the dir. >> I know I can use: >> mv img.bc03.547.1.gif? img.bc03.547.1.gif >> to rename each by hand, but I want to do

Re: how do I write a shell script to batch rename files in a directory?

2008-08-29 Thread ONYTZ
Thanks, all! >From a private post (sorry about my breach of etiquette...) Bob Proulx suggested: > for i in *.gif?; do echo mv --verbose -- "$i" ${i%?}; done Which echoed the response I wanted. I had tried one of the previous suggestions and I got some puzzling output: >> mv: `img.bc05.101.3.