bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling Bash with /S


From: Greg Wooledge
Subject: Re: Calling Bash with /S
Date: Thu, 23 Jun 2011 08:22:54 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Jun 22, 2011 at 09:59:45AM -0700, sweinberger wrote:
> /bin/bash /S /c ""

... MS-DOS 3.30?  Or a modified version of bash?  Or both?

> In Make File:
> @ls -l ./SomeDir/*
> 
> Bash Command
> /bin/bash /S /c "ls -l ./SomeDir/*"
> 
> The /S from what I see enables regular expression processing in the bash
> command line, but maybe I might be wrong.

Well, that may or may not be true... but you don't have any regular
expressions in that command.

In any case, it looks like you are doing something on a most bizarre
operating system, such as MS-DOS, using a modified version of bash
that supports '/' as a command switch instead of '-', and with a '/S'
option that I've never heard of before.

> In any event, the problem that I
> have is the asterisk.  Bash does not like it.  I tried escaping it with a
> backslash up to nine levels but that did not work; should only require one.

What does "does not like it" mean, exactly?  What error are you getting?

> Yes, the actual command that I use is not ls.  In the real example, I am
> using "rm -f", but ls is a good example too and safer for experimentation.

So we don't know what command you were running, and we don't know what
it did, and we don't know what you *expected* it to do.

> How do I write the command line, so that it works?  "ls -l ./SomeDir/\*"
> does not work, nor anything else that I tried so far.

"Does not work"...?  Well, if I run that command inside bash on Unix, then
I would expect it to show me a literal file named '*' inside a
subdirectory named 'SomeDir'.  If there is no literal file named '*' then
I would expect ls to tell me that there is no such file or directory.

What did YOU expect it to do?  What did it ACTUALLY do?

What do you WANT it to do?

Also, in what environment are you doing this?  It is clearly not the
normal Unix environment, and so you should at least tell us what it is,
and tell us about this customized bash you're using.  Otherwise, it's
going to be extremely difficult for us to guess what all those weird
things mean.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]