Hi, everyone,
I'm new to this list. I'd like to ask is there a Windows native port of
Bash or Bourne Shell?
By saying "Windows native", I mean that this shell program does not rely
on cygwin. More specifically, it has the following characteristics:
* The built-in command pwd should return Win
Linda Walsh <[EMAIL PROTECTED]> wrote:
> # *1 - using "-e" stops your script immediately on any error
Not any error - only those from simple commands. The subtleties are
subtle enough that I avoid -e, and use "&&" between all commands
instead.
paul
I was wondering -- in the bash substitute commands ${..%%|##|//} etc,
is there a way to "capture" a subexpression, so that I can
use the subexpression in the replacement string so I can
end up 'only' with the the subexpression?
If the full expression was in a shellvar "Options", I thought about
u
In the spirit of there being more than one solution to every problem,
I made the solution "more complicated" :-) in case you wanted
to check more error conditions...
I included some "Notes" about why I did some things they way I
did, since it may not be immediately obvious. Some of them are
proba
> [EMAIL PROTECTED] schrieb:
>> Hi,
>>
>> I am working on a script and ran into an unusual program. Consider the
>> following script which I called how.sh.
>>
>> =
>>
>> #!/bin/bash
>>
>> error () {
>>
>>echo -e "\n\terror: ${*}\n"
>>exit;
>>
>># kill $$
>>
>> }
>>
>> check_file ()
> [EMAIL PROTECTED] writes:
>
>> =
>>
>> #!/bin/bash
>>
>> error () {
>>
>>echo -e "\n\terror: ${*}\n"
>>exit;
>
> Replace that with "exit 1". You can use any other non-zero exit code.
>
>># kill $$
>>
>> }
>>
>> check_file () {
>>
>>input="$*"
>>
>>if [ -e $input ]; then
>
[EMAIL PROTECTED] writes:
> =
>
> #!/bin/bash
>
> error () {
>
>echo -e "\n\terror: ${*}\n"
>exit;
Replace that with "exit 1". You can use any other non-zero exit code.
># kill $$
>
> }
>
> check_file () {
>
>input="$*"
>
>if [ -e $input ]; then
This will fail if the ar
[EMAIL PROTECTED] schrieb:
Hi,
I am working on a script and ran into an unusual program. Consider the
following script which I called how.sh.
=
#!/bin/bash
error () {
echo -e "\n\terror: ${*}\n"
exit;
# kill $$
}
check_file () {
input="$*"
if [ -e $input ]; then
Hi,
I am working on a script and ran into an unusual program. Consider the
following script which I called how.sh.
=
#!/bin/bash
error () {
echo -e "\n\terror: ${*}\n"
exit;
# kill $$
}
check_file () {
input="$*"
if [ -e $input ]; then
echo "$input"
else